http://www.perlmonks.org?node_id=592154


in reply to Understanding Split and Join

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";