Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: reading from file.

by Eily (Curate)
on Nov 13, 2013 at 20:28 UTC ( #1062462=note: print w/ replies, xml ) Need Help??


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; }


Comment on Re: reading from file.
Select or Download Code
Replies are listed 'Best First'.
Re^2: reading from file.
by scripter87 (Novice) on Nov 13, 2013 at 20:32 UTC
    sorry that was a typo. Can you see any particular reason that the file reads if there is only text on the first line of the file?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062462]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2015-08-28 18:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (339 votes), past polls