If any of you guys can see where I am going wrong let me know. thanks guysmy $name = "names.txt"; my $i = 0; my$t; my @names; my $input = <STDIN>; open(FILE, "<", "$names") or die "Cannot open $names: $!\n"; while ($t=<FILE>){ push (@names, $t); } while ($i<scalar(@names)) { if ($input ne $names[$i] ) { print "not valid"; } $i++; }
In reply to reading from file. by scripter87
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |