in reply to Re^2: Read from a Linux pipe hangs.
in thread Read from a Linux pipe hangs.

Is there any methods to read from a FILE_HANDLER line by line instead of reading till the end of file?

To read from a filehandle a single line at a time, simply do so in scalar context.

my $line = <STDIN>;

will read a single line from STDIN. Note: "Line" is defined based on the value in $/. This defaults to "newline" which is defined based on the operating system perl is running under. If you wish to controll the character which is used to determine what is the end of a "line" you can set $/ (however this should be done in limited scope, probably via local).

May the Force be with you