Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Extracting string from a file

by RMGir (Prior)
on Nov 20, 2013 at 13:09 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1063515]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found