but probably you need to work on it if you need to process empty lines as well.use strict; use warnings; my $str = "First line\nsecond line\netc. lines here"; while($str =~ /([^\n]+)\n?/g){ print "LINE: $1\n"; }
In reply to Re: Parsing multiline string line by line
by perreal
in thread Parsing multiline string line by line
by flamey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |