Re: how to read?

2003-08-18 Thread Ramprasad
Jerry Preston wrote: Hi! This one is new to me and I need to be able to read $name and $age from the following: @history = ( { program => 'new', version => '0.42', }, input => { '/data' => 0.14, '/home' => undef, }, input_contents => ' $name = \'Jerry\

Re: Cron problems

2003-08-18 Thread Ramprasad
Vema Venkata wrote: Hi Floks when i am trying to run the following script it is getting executed but when iam tryint to execute thru corntab it is not?can any one suggest the script name is xapipgm.pl *** #!/bin/sh #

RE: how to read?

2003-08-18 Thread Jerry Preston
Ramprasad, I have no choice in the data format! Thanks, Jerry -Original Message- From: Ramprasad [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 2:24 AM To: [EMAIL PROTECTED]; Jerry Preston Cc: [EMAIL PROTECTED] Subject: Re: how to read? Jerry Preston wrote: > Hi! > > This

RE: Cron problems

2003-08-18 Thread Vema Venkata
like the following can you check and correct me if iam wrong *** . /home/paradigm/.profile #!/bin/sh #myrun.shell xapipgm=srvtst26.pl pgrep -f $xapipgm > /dev/null # runrc=$? # echo "Return Code is: $?" if [ $? -eq 0 ] the

hex2Bin

2003-08-18 Thread Sachin Mathur
hi , I have a file cointaing 1024 hex numbers . I want to convert them to Bin. Please help

Re: Cron jobs and perl

2003-08-18 Thread David T-G
Vema -- ...and then Vema Venkata said... % % have u got the soultion for this? We don't know; she hasn't reported back after my suggestion. % because iam following the same problem Did you try my suggestion? Can you describe your problem in more detail? Don't rely on someone else to tell us

I don't understand why this happen

2003-08-18 Thread Li Ngok Lam
open my $fh, "<", "items/list.db"; print while (<$fh>); close $fh; This is suppose to printout the content in items/list.db , but why I get somthing like "GLOB(0x162aca7)" ?? Thanks in advise.

Re: Perl script to ssh to other machine.

2003-08-18 Thread zentara
On Sat, 16 Aug 2003 17:25:15 -0700 (PDT), [EMAIL PROTECTED] (Titu Kim) wrote: >Hi, > Thanks for your reply. My purpose is not only to >run uptime. I need to write a script to log into other >machines to grep the log file contents. Now, I log in >one by one and grep the log. I want to use the scr

RE: Cron jobs and perl

2003-08-18 Thread Vema Venkata
Hi david when i am trying to run the following script it is getting executed but when iam tryint to execute thru corntab it is not?can any one suggest the script name is xapipgm.pl *** #!/bin/sh #myrun.shel

RE: hex2Bin

2003-08-18 Thread Kipp, James
> hi , > I have a file cointaing 1024 hex numbers . > I want to convert them to Bin. > Please help try something like this: $hex = 0xff; $bin = unpack("B32", pack("N", hex $hex)); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Win32 registry

2003-08-18 Thread Jenda Krynicky
From: Saadat Saeed <[EMAIL PROTECTED]> > I am new to scripting (in general) and am an > administrator of win32 based systems. I am deciding > between Perl & a number of other scripting > technologies to standardise upon. > > The only thing that'll convince me for now is the > abiltity to read and

Re: I don't understand why this happen

2003-08-18 Thread Beau E. Cox
- Original Message - From: "Li Ngok Lam" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 18, 2003 1:10 AM Subject: I don't understand why this happen open my $fh, "<", "items/list.db"; print while (<$fh>); close $fh; This is suppose to printout the content in items/li

Telnet.pm

2003-08-18 Thread Vidal, Christopher, SOLCM
The group helped me to get this small snippet working .. and it works good for when I need to telnet to multiple and/or all servers. #! /opt/perl5/bin/perl # example using Telnet.pm to servers require 'Telnet.pm'; # script server ip username password $t = new Net::Telnet Timeout => 5,

Re: hex2Bin

2003-08-18 Thread Tassilo von Parseval
On Mon, Aug 18, 2003 at 07:34:41AM -0400 Kipp, James wrote: > > I have a file cointaing 1024 hex numbers . > > I want to convert them to Bin. > > Please help > > try something like this: > > $hex = 0xff; > $bin = unpack("B32", pack("N", hex $hex)); The above assumes big-endian byteorder. For

Regular expression help

2003-08-18 Thread EUROSPACE SZARINDAR
Hi, I tried to write a script to extrat data from the given DATA but I can find the right regular expression to do that. RULE: I need to catch everything between quotes (single or double) and if inside exists a repeated quote (single or double) it is not seen as end of the match. #!/usr/bin/perl

Re: I don't understand why this happen

2003-08-18 Thread James Edward Gray II
On Monday, August 18, 2003, at 06:10 AM, Li Ngok Lam wrote: open my $fh, "<", "items/list.db"; I can't test it right this second, but I'm guessing it's the my() call inside of the open. Try this: my $fh; open $fh, '<', 'items/list.db' or die "File error: $!"; print while $fh; close $fh; Hope

RE: hex2Bin

2003-08-18 Thread Kipp, James
> > > > $hex = 0xff; > > $bin = unpack("B32", pack("N", hex $hex)); > > The above assumes big-endian byteorder. For little-endian use > "V" instead > of "N". Or just use "L" when the file has the same byteorder as the > machine you are running this script on. > > Btw, the hex() above is probabl

Re: I don't understand why this happen

2003-08-18 Thread Li Ngok Lam
> > my $fh; > open $fh, '<', 'items/list.db' or die "File error: $!"; It just the same as open my $fh =) > print while $fh; Hmm. I guess this is not a 'read' argument Thanks in advise anyway =) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: I don't understand why this happen

2003-08-18 Thread Li Ngok Lam
Thank you very much Beau. However, my question is not how to solve, there are many ways in deed, but why this happen and what's that actually? =) The only problem I can bet here is because I use the Switch.pm in my script. TIA, again - Original Message - From: "Beau E. Cox" <[EMAIL PRO

RE: Cron jobs and perl

2003-08-18 Thread Dan Muey
> Hi david > > when i am trying to run the following script > it is getting executed but when iam tryint to execute thru > corntab it is not?can any one suggest > > the script name is xapipgm.pl Actually in your example below it is srvtst26.pl Try using absolute paths. Sometimes cron w

Hash of Hash

2003-08-18 Thread Zielfelder, Robert
Greetings, I am attempting to make a hash of hashes or something equivalent but can't seem to get it working properly. Here is what I have so far: @name = ("one", "two", "three"); Foreach my $layer (@name) { $thief_opt = { $layer = { type

RE: Cron jobs and perl

2003-08-18 Thread Vema Venkata
Dude iam using srvtst26.pl yes.. and the script is situtated in the following path i.e "/proj/ahd02/CAisd/site/mods/scripts" can u suggest me where i should use ... -Original Message- From: Dan Muey [mailto:[EMAIL PROTECTED] Sent: Monday, 18 August 2003 6:55 PM To: Vema Venkata; David

RE: Hash of Hash

2003-08-18 Thread Dan Muey
> Greetings, > > I am attempting to make a hash of hashes or something > equivalent but can't seem to get it working properly. Here > is what I have so far: > > @name = ("one", "two", "three"); > > Foreach my $layer (@name) { > $thief_opt = { > $layer = { >

RE: Cron jobs and perl

2003-08-18 Thread Dan Muey
> Dude > iam using srvtst26.pl yes.. > and the script is situtated in the following path i.e > "/proj/ahd02/CAisd/site/mods/scripts" > > can u suggest me where i should use ... > Sure : xapipgm=/proj/ahd02/CAisd/site/mods/scripts/srvtst26.pl Also permissions permissions permissions :) HTH D

RE: Hash of Hash

2003-08-18 Thread Hanson, Rob
I think you mean this... use strict; my %thief_opt; my @name = ("one", "two", "three"); foreach my $layer (@name) { $thief_opt{$layer} = { type => "solid", origin => "datum", use_arcs => "yes", }; } # test with this. prints out structure to console. use Data::Dumper; pri

Day of the week

2003-08-18 Thread Nigel Peck - MIS Web Design
Can someone please point me to the right module for getting the name of a specified day. e.g. I say 'year:2003 month:5 day:23' I get 'Friday' Thanks Nigel MIS Web Design http://www.miswebdesign.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

RE: Hash of Hash

2003-08-18 Thread Zielfelder, Robert
This is exactly what I was after. Not being a "real" programmer I was tripping on syntax as usual. Thanks for the help Rz .-. --.. -Original Message- From: Hanson, Rob [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 9:50 AM To: Zielfelder, Robert; Perl Beginners List

RE: Day of the week

2003-08-18 Thread Hanson, Rob
Time::Local, and the internal localtime(). use Time::Local; my @days = qw(Sun Mon Tue Wed Thu Fri Sat); my $time = timelocal(0,0,0,23,4,103); my @parts = localtime($time); print "$days[$parts[6]]\n"; Rob -Original Message- From: Nigel Peck - MIS Web Design [mailto:[EMAIL PROTECTED] Se

Re: I don't understand why this happen

2003-08-18 Thread James Edward Gray II
On Monday, August 18, 2003, at 08:10 AM, Li Ngok Lam wrote: my $fh; open $fh, '<', 'items/list.db' or die "File error: $!"; It just the same as open my $fh =) Save that it reads a little better, I think, and checks errors. print while $fh; Hmm. I guess this is not a 'read' argument

RE: Quite day

2003-08-18 Thread Dan Muey
> From: "Dan Muey" <[EMAIL PROTECTED]> > > All I hear are crickets on the list anybody there today? > > Hey I aint no cricket ;-) I wasn't getting any messages from the list. I think it had to do with the black out. Thanks for the input! > > > I'd like to have a simple spider that will look a

RE: Dump Html file as output from CGI script

2003-08-18 Thread Dan Muey
> Hi Dan, > > I don't think that is actually what he is asking for.Unless I > misunderstand, he is referring to a pass-through program. Of That's why I asked what he meant. The absolut simpleest would be: #!/usr/bin/perl -w use strict; use CGI qw(header); use File::Slurp; pritn header(); p

Re: Cron jobs and perl

2003-08-18 Thread Trina Espinoza
Sorry for being so unresponsive Vema! I was away from my desk when you had your problems. Unfortunately, I am still trying to get my cron job working. My job seems to pick up fine, but then it drops the path half way through because it doesn't understand the path.The path is an absolute path which

RE: Cron jobs and perl

2003-08-18 Thread Vema Venkata
no not yet i havent got any solution of it -Original Message- From: Trina Espinoza [mailto:[EMAIL PROTECTED] Sent: Monday, 18 August 2003 7:56 PM To: Vema Venkata; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: Cron jobs and perl Sorry for being so unresponsive Vema! I was away from m

RE: Quite day

2003-08-18 Thread Dan Muey
> Dan Muey wrote: > > All I hear are crickets on the list anybody there today? > > Maybe its because the northeastern quarter of the US was > blacked out all > day... muuuhhh we have power! Yup seems to be the blackout. > > > > > Here's a quick thing I was wondering since I'm no http exp

RE: Cron jobs and perl

2003-08-18 Thread Dan Muey
Please post back to the list and not just me only. > dude > this is the error iam getting again > ** > > /proj/ahd02/CAisd/site/mods/scripts/xapipgm.pl: > log/init/ahdxapi.init..log.: cannot create >

Re: Regular expression help

2003-08-18 Thread Rob Anderson
"Eurospace Szarindar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I tried to write a script to extrat data from the given DATA but I can find > the right regular expression to do that. Hi Szarindar, Firstly why are you using this format and trying to parse it yourself?

RE: AW: SSH Problem

2003-08-18 Thread wiggins
On Sun, 17 Aug 2003 19:26:53 +0200, Björn_Brombach <[EMAIL PROTECTED]> wrote: > I wanted to add some more details: > When i use this skript: > > my $supported = Net::SSH::Perl::Cipher::supported(); > for my $cipher (sort @$supported) { > print

RE: Case conversions

2003-08-18 Thread Dan Muey
> > "Scott" == Scott Taylor <[EMAIL PROTECTED]> writes: > > Scott> Any one have or know of a function to convert ugly > "NAME, USER" > Scott> to "User Name"? > I'd do soemthign like this: my($name, $user) = split(/,/, $line); $name =~ s/^\s+//; $name = ucfirst(lc($n

RE: Regular expression help

2003-08-18 Thread EUROSPACE SZARINDAR
Thanks you, it works fine. Could you explain me why have you added the \1 ? I will have a look at Text::CSV Michel -Message d'origine- De: Rob Anderson [mailto:[EMAIL PROTECTED] Date: lundi 18 août 2003 16:39 À: [EMAIL PROTECTED] Objet: Re: Regular expression help "Eurospace Szarindar

need help decompose word

2003-08-18 Thread awards
Hi, I have no idea how to do this. I have a name Anthony Bob I want to put each letter in an array (no space) for(0..$numbersofletters){ @letters[c]= A LETTER } so when i do print @letters i get A N T H O N Y B O B something like that, any help is appreciated. Anthony -- To unsubscribe, e-mail

Re: Regular expression help

2003-08-18 Thread Rob Anderson
> >"Eurospace Szarindar" <[EMAIL PROTECTED]> wrote in message >news:[EMAIL PROTECTED] > >Thanks you, it works fine. Could you explain me why have you added the \1 ? Hi, A quick breakdown... /(['"])(((''|"")|[^'"])*?)\1(\s|$)/g ^^ 1 2

RE: need help decompose word

2003-08-18 Thread Dan Muey
> Hi, Howdy, > > I have no idea how to do this. > I have a name > Anthony Bob > I want to put each letter in an array (no space) > for(0..$numbersofletters){ @letters[c]= A LETTER } so when i > do print @letters i get A N T H O N Y B O B something like > that, any help is appreciated. Anthony

Re: need help decompose word

2003-08-18 Thread James Edward Gray II
On Monday, August 18, 2003, at 10:29 AM, awards wrote: Hi, I have no idea how to do this. I have a name Anthony Bob I want to put each letter in an array (no space) my $name = 'Anthony Bob'; $name =~ tr/ //d; # remove the space my @letters = split //, $name; for(0..$numbersofletter

Re: need help decompose word

2003-08-18 Thread awards
Hi, That is quite simple. I tought it would be more difficult than that :-) Thank you both of you Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: need help decompose word

2003-08-18 Thread Dan Muey
> Hi, Howdy > > That is quite simple. I tought it would be more difficult > than that :-) > It's cuz Perl rocks!! > Thank you both of you > Anthony > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail

RE: need help decompose word

2003-08-18 Thread Hanson, Rob
Just to throw out another idea, you can also do this... my $name = "Anthony Bob"; my @letters = grep {!/\s/} split('', $name); # to test print "@letters"; It also looks like you wanted upper case. You can do that with this... my $name = "Anthony Bob"; my @letters = grep {!/\s/} split('', uc($n

Split NewLines

2003-08-18 Thread Pablo Fischer
Hi! I have in $string something like: $string="1 blabla"; When Im printing $string I get a new line between 1 and blabla, now I needt o split that.. in my($number, $real_string) = split... How can I split it? Thanks! Pd. Its a scalar variable Pablo -- Pablo Fischer Sandoval ([EMAIL PROTECT

RE: Split NewLines

2003-08-18 Thread Hanson, Rob
Like this... $string="1 blabla"; my @lines = split("\n", $string); # testing... print "1: $lines[0]\n"; print "2: $lines[1]\n"; See perldoc -f split if you want more info on the command. Rob -Original Message- From: Pablo Fischer [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003

Re: Split NewLines

2003-08-18 Thread Li Ngok Lam
> > $string="1 > blabla"; > > When Im printing $string I get a new line between 1 and blabla, now I needt o > split that.. in > > my($number, $real_string) = split... my($number, $real_string) = split /\n/, $string; HTH -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-m

Input Regex (error checking)

2003-08-18 Thread Ned Cunningham
HI, What would be the best way to check for data integrity of an input? Chomp (my $ans=); #first make sure data is 6 digits make sure length is 6 Thankx Ned Cunningham POS Systems Development Monro Muffler Brake 200 Holleder Parkway Rochester, NY 14615 (585) 647-6400 ext. 310 [EMAIL PROTECT

RE: need help decompose word

2003-08-18 Thread Bob Showalter
awards wrote: > Hi, > > I have no idea how to do this. > I have a name > Anthony Bob > I want to put each letter in an array (no space) > for(0..$numbersofletters){ > @letters[c]= A LETTER > } > so when i do print @letters i get > A > N > T > H > O > N > Y > B > O > B > something like that, any he

RE: Input Regex (error checking)

2003-08-18 Thread Hanson, Rob
chomp (my $ans=); $ans =~ /^\d{6}$/ or die "Bad input!"; # ...or... unless ($ans =~ /^\d{6}$/) { # blah, blah, blah } # Or loop until correct input received... my $ans = undef; do { print "Invalid response\n" if defined $ans; print "Enter your answer: "; chomp($ans = ); } while $

Variable instaed of GLOB REF

2003-08-18 Thread Dan Muey
Howdy all! If you have a function that is expecting a FILEHANDLE as it's argument how could you supply it a variable instead? For instance: my $mio = Mail::Internet(\*STDIN); ... Which is peachy. What I'd like to be able to do is use the data in the vari

RE: Variable instaed of GLOB REF

2003-08-18 Thread Dan Muey
> Howdy all! > > If you have a function that is expecting a FILEHANDLE as it's Sorry FILHANDLE Refence actually. > argument how could you supply it a variable instead? > > For instance: > > my $mio = Mail::Internet(\*STDIN); > ... > Which is peachy. > What I'd like to

RE: Variable instaed of GLOB REF

2003-08-18 Thread Hanson, Rob
There are ways to fake a filehandle by tieing it to a module, but that is a bit cumbersome. Looking at the Mail::Internet docs it seems that you can pass it an array reference instead of a filehandle ref. Try this, I think it will work... my $mio = Mail::Internet([$data]); Rob -Original M

RE: Variable instaed of GLOB REF

2003-08-18 Thread Dan Muey
> There are ways to fake a filehandle by tieing it to a module, > but that is a bit cumbersome. Looking at the Mail::Internet > docs it seems that you can pass it an array reference instead > of a filehandle ref. > Oh yeah I see that now, that may be just the ticket. I'll try it out and let

Re: Check my script

2003-08-18 Thread Keith Olmstead
Thanks for everybody that has given there input. I have changed a few things up and all is good. Thanks, Keith On Fri, 15 Aug 2003, Keith Olmstead wrote: Date: Fri, 15 Aug 2003 16:16:44 -0500 (CDT) From: Keith Olmstead <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Check my script Hello,

RE: Variable instaed of GLOB REF

2003-08-18 Thread Dan Muey
> > There are ways to fake a filehandle by tieing it to a module, > > but that is a bit cumbersome. Looking at the Mail::Internet > > docs it seems that you can pass it an array reference instead > > of a filehandle ref. > > > > > Oh yeah I see that now, that may be just the ticket. > I'll tr

New to list, question.

2003-08-18 Thread Rich Parker
Hi, I've been involved with Perl for many years (too many to count right now). One question has been bugging me lately, and maybe it's because I don't know enough about it, or maybe it's because I've been "Not the biggest fan" of Mr. Bill and his org... Either way, I'm attempting to learn about

RE: New to list, question.

2003-08-18 Thread wiggins
On Mon, 18 Aug 2003 12:40:02 -0700, Rich Parker <[EMAIL PROTECTED]> wrote: > Hi, > I've been involved with Perl for many years (too many to count right > now). One question has been bugging me lately, and maybe it's because I > don't know enough

RE: how to read?

2003-08-18 Thread Charles K. Clarkson
Jerry Preston <[EMAIL PROTECTED]> wrote: : : This one is new to me and I need to be able to : read $name and $age from the following: : : @history = ( : { : program => 'new', : version => '0.42', : }, : input => { : '/data' => 0.14, : '/home' => undef, : }, :

Re: get all the arrays with names starting with xyz

2003-08-18 Thread david
T.S.Ravi Shankar wrote: > Hi all : > > I have few arrays with names starting with "xyz_". After the initial > definitions I want to change values of a particular index of all arrays > whose names start with "xyz_". It would be cumbersome for me to do > something like : > > $xyz_blahblah[$index

Array to hash with reverse split?

2003-08-18 Thread linux . rocks
Hi All, I want to read contents of a dir, filtered, into a hash. I have this: #/usr/local/bin -w use strict; my (@ARRAY, %TEST, $FILTER) = ""; print "Enter filter:"; $FILTER = ; chomp $FILTER; @ARRAY = ` ls -l /foo/bar | grep "$FILTER" `; for (@ARRAY) { chomp; } This gets just the info I want,

RE: Array to hash with reverse split?

2003-08-18 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > Hi All, > > I want to read contents of a dir, filtered, into a hash. I have this: > > #/usr/local/bin -w > use strict; > my (@ARRAY, %TEST, $FILTER) = ""; > > print "Enter filter:"; > $FILTER = ; > chomp $FILTER; > @ARRAY = ` ls -l /foo/bar | grep "$FILTER" `; > for (

Re: need help decompose word

2003-08-18 Thread John W. Krahn
Awards wrote: > > Hi, Hello, > I have no idea how to do this. > I have a name > Anthony Bob > I want to put each letter in an array (no space) > for(0..$numbersofletters){ > @letters[c]= A LETTER > } > so when i do print @letters i get > A > N > T > H > O > N > Y > B > O > B > something like tha

RE: New to list, question.

2003-08-18 Thread McMahon, Christopher x66156
I'll take this a step further. Search Google for "de icaza .net". Miguel de Icaza produced the GNOME desktop and founded Ximian/Mono. He's quoted all over the place discussing what .NET has to offer beyond the MS arena, for Open Source and wide interoperability. I think that de Icaza e

RE: need help decompose word

2003-08-18 Thread Bob Showalter
John W. Krahn wrote: > ... > my @letters = $text =~ /[[:alpha:]]/g; I never knew you could leave the parens off in a case like this. I just went and looked it up. Neat! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: need help decompose word

2003-08-18 Thread Bernhard van Staveren
> my $text = ' Anthony Bob '; > > my @letters = $text =~ /[[:alpha:]]/g; > > print "$_\n" for @letters; This works too (at least, works for me): my $text='Anthony Bob'; my @letters=split(//, $text); print(join("\n", @letters)); -- Bernhard van Staveren - madcat(at)ghostfield.com GhostField

RE: Array to hash with reverse split?

2003-08-18 Thread Dan Muey
> [EMAIL PROTECTED] wrote: > > Hi All, > > > > I want to read contents of a dir, filtered, into a hash. I > have this: > > > > #/usr/local/bin -w > > use strict; > > my (@ARRAY, %TEST, $FILTER) = ""; > > You may want to make sure $FILTER isn't anythign harmful here: For instance what if Someo

memoizing a variable

2003-08-18 Thread Robert Citek
Hello all, I want a variable to be memoized, that is, keep the variable available only to the function and the value remembered across invocations. So far, I have created two versions listed below, both of which "work." The first version prints a warning message 'Variable "$bar" will not stay s

Re: New to list, question.

2003-08-18 Thread Rich Parker
Very interesting reading, Thanks, Actually, it "Could be" great reading to "Sleep by". But I have a concern about all of this, be that a MS "Controlled" .NET or even an "OPEN source" Mono. Who is going to "control" where all of this resides? Let's take the MS idea of .NET for a moment, remember

Re: memoizing a variable

2003-08-18 Thread John W. Krahn
Robert Citek wrote: > > Hello all, Hello, > I want a variable to be memoized, that is, keep the variable available only > to the function and the value remembered across invocations. So far, I > have created two versions listed below, both of which "work." The first > version prints a warning

Re: Array to hash with reverse split?

2003-08-18 Thread John W. Krahn
Linux Rocks wrote: > > Hi All, Hello, > I want to read contents of a dir, filtered, into a hash. I have this: > > #/usr/local/bin -w ^^ I see no 'perl' there. > use strict; > my (@ARRAY, %TEST, $FILTER) = ""; Why are you assigning "" to the first element of @ARRAY? > print

Display realtime data As it changes in the databse - TK

2003-08-18 Thread samuel shankar
Hi List I was wandering if someone can help me out in displaying database data in a TK window. I have tried a number of ways but I am loosing memory eventually.. I vet all "my"'s are not really mine.. All I need to do is fetch from a database and display it In a GUI based window. Or some ones has

closure (was Re: memoizing a variable)

2003-08-18 Thread Robert Citek
At 04:18 PM 8/18/2003 -0700, John W. Krahn wrote: > ... it looks like you want a closure instead. > >{ # limit scope of $bar >my $bar = 100; >sub foo { ++$bar } >} Thanks for the example. I quess I do want closure. I'm not clear on how closure differs from memoizing. Regardless, this worked e

Re: Display realtime data As it changes in the databse - TK

2003-08-18 Thread Ramprasad A Padmanabhan
Samuel Shankar wrote: Hi List I was wandering if someone can help me out in displaying database data in a TK window. please wander a little more, on google if you are looking for readymade script I have tried a number of ways but I am loosing memory eventually.. I vet all "my"'s are not really m

Re: Display realtime data As it changes in the databse - TK

2003-08-18 Thread Voodoo Raja
Sorry for not posting it in the first place. Will this sub.. chew memory if I run it a number of times.. or does it overwrite it. sub read { print "\nreading data"; $db = DBI->connect("DBI:mysql:$dbase:$hostname", $username, $password); $query = $db->prepare("SELECT * FROM cash where f1 = '1002'