On Wednesday, August 25, 2004 6:15 PM, I wrote: > not extensively tested: this is a bit more tested: #!/usr/local/bin/perl
open(F, "file.txt");
while(<F>){
chomp(my $line = $_);
my ($key) = $line =~ /^(\S+)\s/;
$hash{$key} = $line;
}
close F;
foreach my $value (values %hash){
print "$value\n";
}
Jeremy Kister
http://jeremy.kister.net/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
