in reply to Parsing multiline string line by line
You can split the string on newlines into an array, and then iterate through it in a foreach loop.
my @lines = split /\n/, $str; foreach my $line (@lines) { ... }
In Section
Seekers of Perl Wisdom
in reply to Parsing multiline string line by line
You can split the string on newlines into an array, and then iterate through it in a foreach loop.
my @lines = split /\n/, $str; foreach my $line (@lines) { ... }