develooper Front page | perl.beginners | Postings from February 2002

Re: Printing values from hashes

Thread Previous | Thread Next
From:
J.Hourihane
Date:
February 13, 2002 07:37
Subject:
Re: Printing values from hashes
Message ID:
9877566273EED511A7560008C716DA06B394@exchcpn1.cdcna.com
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} = "$VALUE";
	print "the users in Group $KEY are $VALUE\n";


}
=======================================================

Thanks in Advance

Jaime Hourihane
CDC-IXIS
212.891.1935

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About