On 2011-08-01 15:52, Shlomi Fish wrote:

To convert a string to characters one can use split based on the empty regex,

That should be "a pattern matching the empty string".

The "empty regex" works differently:

perl -wle '
  my $text = "abcdefghi";
  $text =~ /[aeiou]/;
  $text =~ /x/;
  my @result = $text =~ //g;
  print "@result";
'
a e i

(admire how 'regex' and 'regular expression' are avoided in perldoc -f split)

--
Ruud

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to