Re: Printing values from hashes

2002-02-13 Thread J . Hourihane
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(GROUP) { ($KEY,$gpass,$ggid,$VALUE) = split(/:+/); $HASH{$KEY} =

RE: Printing values from hashes

2002-02-13 Thread John Edwards
] 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(GROUP) { ($KEY,$gpass,$ggid,$VALUE

Re: Printing values from hashes

2002-02-13 Thread Steve Mayer
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

RE: Printing values from hashes

2002-02-13 Thread J . Hourihane
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 : for the separator, you are causing