in reply to How to perform single operation to each line in file

Your code does not compile.

Please post code that actually compiles instead of typing it in separately.

Also, you may want to think about what the following line is supposed to do:

foreach(my $line = <$FH>) {

... maybe you want to learn about what readline resp. the diamond operator does in scalar context. Most likely, while is a better approach.

Replies are listed 'Best First'.
Re^2: How to perform single operation to each line in file
by rammohan (Acolyte) on Jan 21, 2014 at 11:44 UTC
    i tried while loop also but it doesn't showing what I'm expecting
A reply falls below the community's threshold of quality. You may see it by logging in.