While running under strict (use strict; on the first line): Global symbol "$names" requires explicit package name at - line 8.. The scalar you declared is $name, with no s at the end.
Just so you know, you can write the second loop as:
for my $el (@names) { print "not valid" if $input ne $el; }
In reply to Re: reading from file.
by Eily
in thread reading from file.
by scripter87
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |