$line='

test1
test2
test3
test4
'; while ( $line=~//ig ) { $tmp=$1; print "LINE: $line\n"; print "TMP: $tmp KK\n\n"; $line=~s///i; }