in reply to Re: Re: reg ex help
in thread reg ex help
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: reg ex help
by tachyon (Chancellor) on Apr 15, 2004 at 11:25 UTC | |
by Abigail-II (Bishop) on Apr 15, 2004 at 11:52 UTC | |
by pelagic (Priest) on Apr 15, 2004 at 12:06 UTC |