$ cat test.txt bla. fasel . foo . bar. $ perl -e ' use IO::String; $str=`cat test.txt`; $fh = IO::String->new($str); $/="."; print "$_|" for <$fh>' bla.| fasel .| foo .| bar.| |