in reply to reading from file.
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; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: reading from file.
by scripter87 (Novice) on Nov 13, 2013 at 20:32 UTC |