Re: scalars & lists

2003-11-29 Thread James Edward Gray II
On Nov 30, 2003, at 1:45 AM, B. Rothstein wrote: If I have a scalar variable that itslef is a list of names, for example $names = 'john, jack, albert, timmy"; is it possible, and if so how can it be done to separate the individual names from the list in their scalar form in order to create a new

scalars & lists

2003-11-29 Thread B. Rothstein
If I have a scalar variable that itslef is a list of names, for example $names = 'john, jack, albert, timmy"; is it possible, and if so how can it be done to separate the individual names from the list in their scalar form in order to create a new list of sorted names. thanks for any suggestions.

Re: Stupid Question

2003-11-29 Thread John W. Krahn
Rob Dixon wrote: > > Joseph wrote: > > > > "John W. Krahn" wrote: > > > > > > If you want to clear out the hash completely then: > > > > > > %hash = (); > > > > > > Will remove all the keys and values from the hash. This will also work > > > with a hash of hashes. > > > > > > Or if you need to re

Re: Stupid Question

2003-11-29 Thread drieux
On Nov 29, 2003, at 12:29 PM, Rob Dixon wrote: [..] I agree with your point, but there's no reference counting involved here (unless the hash values were themselves references). Rob I think that is a part of the issue that folks need to also be thinking about when they are putting together HoH an

Re: Stupid Question

2003-11-29 Thread R. Joseph Newton
Rob Dixon wrote: > Joseph wrote: > > > > > > > > %hash = (); > > Hi Joseph. > > I agree with your point, but there's no reference counting involved here > (unless the hash values were themselves references). > > Rob I'll be darned, you're right. I just noticed, as I was about to argue the contra

Re: problems with regular expressions

2003-11-29 Thread R. Joseph Newton
Dan Anderson wrote: > I have a regular expression that looks like: > > $foo =~ s[class.*?=.*?'.*?'][]sgi; > > The problem I run into is that if the following is presented to match: > > > > The regular expression will match: > > class='foo'> > And I'll get: > > > > Is there any way I can tell the

Re: Stupid Question

2003-11-29 Thread Rob Dixon
Joseph wrote: > > "John W. Krahn" wrote: > > > Jason Dusek wrote: > > > > > > Hi Perl Beginners, > > > > Hello, > > > > > Let's say I have a hash of hashes. And I want to use it over and over > > > again, so I need to reinitialize it often. I suppose I could go > > > through each key in the hash

Re: Openning Files Names with Embedded Spaces

2003-11-29 Thread R. Joseph Newton
Jeff Westman wrote: > Tim Johnson <[EMAIL PROTECTED]> wrote: > > > Granted, I'm on XP, but I can't seem to reproduce your error. I created a > > file at the path specified and it works perfectly. Are you sure that you > > have the exact filename and that you have access to it? (I guess it's > >

Re: problems with regular expressions

2003-11-29 Thread drieux
On Nov 29, 2003, at 11:35 AM, James Edward Gray II wrote: On Nov 29, 2003, at 1:15 PM, Dan Anderson wrote: I have a regular expression that looks like: $foo =~ s[class.*?=.*?'.*?'][]sgi; We're just looking for spaces with most of those .*?s, right? Why don't we say that. And between quotes we're

Re: problems with regular expressions

2003-11-29 Thread James Edward Gray II
On Nov 29, 2003, at 1:15 PM, Dan Anderson wrote: I have a regular expression that looks like: $foo =~ s[class.*?=.*?'.*?'][]sgi; We're just looking for spaces with most of those .*?s, right? Why don't we say that. And between quotes we're looking for non-quote characters, right? s/class\s*=\

problems with regular expressions

2003-11-29 Thread Dan Anderson
I have a regular expression that looks like: $foo =~ s[class.*?=.*?'.*?'][]sgi; The problem I run into is that if the following is presented to match: The regular expression will match: class='foo'> Is there any way I can tell the .*? to match "" as well as "."? Thanks in advance, Dan -

Re: Viewing logs on other computers.

2003-11-29 Thread Dan Anderson
Although it's not quite the same thing, I wrote a pretty simple Perl script to keep track of disk space usage on a number of file servers. Because df needed to be run as root (access to /proc wasnm't allowed for underprivileged users) I setuided it to root. If I were

Re: holy ravenous bugblatter beast of traal!

2003-11-29 Thread Steve Grazzini
On Fri, Nov 28, 2003 at 11:49:25PM -0800, drieux wrote: > has anyone else bumped heads with the 5.8.1 perlio layer where > the old school tie > > chomp(my $line = ); > > now pops out if a sig handler is called on a signal, such as > SIG_CHLD??? This looks like the new "safe signals" featur

holy ravenous bugblatter beast of traal!

2003-11-29 Thread drieux
volks, has anyone else bumped heads with the 5.8.1 perlio layer where the old school tie chomp(my $line = ); now pops out if a sig handler is called on a signal, such as SIG_CHLD??? I just did the upgrade and got bitten with that silly demo code about doing command line arguments. Since right be

Re: Stupid Question

2003-11-29 Thread R. Joseph Newton
Jason Dusek wrote: > Hi Everyone, > > On Friday, November 28, 2003, at 08:51 PM, drieux wrote: > > a. how did you initialize it to begin with > > and why not simple re-use that solution > > The hash consists of filenames, line numbers and strings. > > $HASH{$file}{$line} = line of c

RE: Openning Files Names with Embedded Spaces

2003-11-29 Thread Jeff Westman
Tim Johnson <[EMAIL PROTECTED]> wrote: > Granted, I'm on XP, but I can't seem to reproduce your error. I created a > file at the path specified and it works perfectly. Are you sure that you > have the exact filename and that you have access to it? (I guess it's > windows 98, so you pretty much

Re: Stupid Question

2003-11-29 Thread R. Joseph Newton
"John W. Krahn" wrote: > Jason Dusek wrote: > > > > Hi Perl Beginners, > > Hello, > > > Let's say I have a hash of hashes. And I want to use it over and over > > again, so I need to reinitialize it often. I suppose I could go > > through each key in the hash of hashes, and go through each key in

Re: Openning Files Names with Embedded Spaces

2003-11-29 Thread Jeff Westman
Rob Dixon <[EMAIL PROTECTED]> wrote: > Jeff wrote: > > > > I am using Active Perl under Windoze 98. I am trying to open a file that > has > > embedded spaces. I tried escaping the spaces as well, and that didn't > work > > either. > > > > #! perl -w > > $file = "c:\\win\\start menu\\programs\\sy