What happens if the delimiter is indicated to be a null string (a string of zero characters)?
perl behaves inconsistently with regard to the "empty" regex:
my $string = 'Monk'; exit unless $string =~ /(o)/; my @matches = $string =~ //; warn join('=', @matches), "\n"; exit unless $string =~ /(o)/; my @letters = split( //, $string ); warn join('-', @letters), "\n";
In reply to Re: Understanding Split and Join
by chromatic
in thread Understanding Split and Join
by davido
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |