FWIW split ' ', $data is magical in that the ' ' matches any quanitity of whitespace ie spaces, tabs, newlines. Syntactic sugar for \s+ really.split ' ' and split /\s+/ are not quite the same:
#!/usr/bin/perl use strict; use warnings; $_ = " foo bar baz "; my @a = split ' '; my @b = split /\s+/; print scalar @a, "\n"; print scalar @b, "\n"; __END__ 3 4
Abigail
In reply to Re: reg ex help
by Abigail-II
in thread reg ex help
by markd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |