This will actually fail because it will split on ':' before '::' and thus return unwanted null fields. You need to do /::|:|\s+/. See below....
$string = "a:b::c d"; @fields = split(/:|::|\s+/, $string); print "Got '$_'\n" for @fields; __DATA__ Got 'a' Got 'b' Got '' Got 'c' Got 'd'
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Re: expanding the functionality of split
by tachyon
in thread expanding the functionality of split
by tigervamp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |