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) { ... }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Parsing multiline string line by line
by zwon (Abbot) on Feb 19, 2009 at 14:15 UTC | |
by ikegami (Patriarch) on Feb 19, 2009 at 14:40 UTC | |
Re^2: Parsing multiline string line by line
by flamey (Scribe) on Feb 19, 2009 at 14:15 UTC |
In Section
Seekers of Perl Wisdom