Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Welcome to the Monastery
 
PerlMonks  

Re: Newby question

by davido (Bishop)
on Aug 05, 2012 at 07:01 UTC ( #985492=note: print w/ replies, xml ) Need Help??


in reply to Newby question

In line 17 you open a file. The filehandle is stored in a typeglob called READFILE, and the file's name is stored in the scalar variable $infile.

In line 19 you attempt to read from a filehandle held in $infile. But it's not intended to be used as a filehandle; it's just a string holding the name of a file that the user entered in line 8. You should change line 19 to: while(<READFILE>){.


Dave


Comment on Re: Newby question
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (17)
As of 2013-06-19 20:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many continents have you visited?









    Results (673 votes), past polls