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.