in reply to Re^4: Parsing with RegEx into Array
in thread Parsing with RegEx into Array
For the match operator. "/s" causes "." to match any byte/character. Without it, "." matches any byte/character except 0x0A/newline. Operators are documented in perlop. There's probably more info perlre.
open(my $fh_in, '<:encoding(UTF-8)', ...) or die ...; ... my @allItems = $file_in =~ m{<item>(.*?)</item>}sg; ... open(my $fh_out, '>:encoding(UTF-8)', ...) or die ...; print $fh_out ...;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Parsing with RegEx into Array
by mr_p (Scribe) on Jun 25, 2010 at 23:07 UTC |