Mayer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 10:49 AM
To: Hourihane, Jaime
Cc: [EMAIL PROTECTED]
Subject: Re: Printing values from hashes
Jaime,
The problem is with the regular expression that you are using in the
split function.
When you say to use 1 or more ":&qu
Jaime,
The problem is with the regular expression that you are using in the
split function.
When you say to use 1 or more ":" for the separator, you are causing
the password field to be skipped (if it is empty as you will have two
"::" together.
If you change your regexp to just be
]
Subject: Re: Printing values from hashes
Hi I am new to hashes
Can somebody tell me why I can print $KEY but not $VALUE?
==
#!/usr/local/bin
open(GROUP, "/etc/group") || die "Cannot open:$!\n";
while() {
($KEY
Hi I am new to hashes
Can somebody tell me why I can print $KEY but not $VALUE?
==
#!/usr/local/bin
open(GROUP, "/etc/group") || die "Cannot open:$!\n";
while() {
($KEY,$gpass,$ggid,$VALUE) = split(/:+/);
$HASH{$KEY} = "$VA