Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Extracting string from a file

by RMGir (Prior)
on Nov 20, 2013 at 13:09 UTC ( #1063515=note: print w/replies, xml ) Need Help??


in reply to Re: Extracting string from a file
in thread Extracting string from a file

It's a simple bug - you're copying the file handle rather than reading from it.
while (my $line = $FH) {
should instead be
while (my $line = <$FH>) {
The "<>" around $FH reads from the filehandle (a line at a time, in this context).

Mike

Replies are listed 'Best First'.
Re^3: Extracting string from a file
by Bindo (Acolyte) on Nov 22, 2013 at 06:33 UTC

    Thank you very much Mike. It worked. :) Really appreciate it.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063515]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2018-01-18 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (213 votes). Check out past polls.

    Notices?