in reply to What is the error in my script or file setup?
in thread File Input and Output
mmhhh, different possibilites that this doesn't work
The DATA section behaves exactly like a file - inside your file and you don't have to open it. If it does thenuse strict; use warnings; my @list; while(<DATA>) { chomp; push @list, $_; } my $i="harv"; foreach my $list (@list) { if($i eq $list) { print "YES!\n"; } } __DATA__ fred 20.4 harv 5.6 tony 5.13 dennis 401.1
-- Hofmator
|
---|