in reply to split(/:/, $t) splits also on white space

Why are you using <@a>?
  • Comment on Re: split always splits also on white space (Perl v5.14.2) Ubuntu (12.04)
  • Download Code

Replies are listed 'Best First'.
Re^2: split always splits also on white space (Perl v5.14.2) Ubuntu (12.04)
by Anonymous Monk on Sep 25, 2014 at 10:19 UTC
    <@a> is glob not readline ... neither of which you want to iterate over an array
    use strict; use warnings; use Data::Dump qw/ dd /; my $colons = "A B:C D"; my @notColons =split(/:/, $colons); dd( $colons, \@notColons ); __END__ ("A B:C D", ["A B", "C D"])

      Thank You AnonymousMonk
      for the prompt and exhaustive reply.
      I have also realized how much I have yet to meditate to become a perl monk !
      Thank you again