|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: Newby questionby davido (Bishop) |
| on Aug 05, 2012 at 07:01 UTC ( #985492=note: print w/ replies, xml ) | Need Help?? |
|
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
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||