That split(/ /,$foo) and split m/ /,$foo are exactly the same. I was pointing out the difference between split m/ /, $line and split(" ", $line)
$ perl -le' use Data::Dumper; $Data::Dumper::Useqq = 1; my $foo = " abc\t\tdef\r\rghi\n"; print Dumper $_ for split / /, $foo; ' $VAR1 = ""; $VAR1 = ""; $VAR1 = "abc\t\tdef\r\rghi\n"; $ perl -le' use Data::Dumper; $Data::Dumper::Useqq = 1; my $foo = " abc\t\tdef\r\rghi\n"; print Dumper $_ for split " ", $foo; ' $VAR1 = "abc"; $VAR1 = "def"; $VAR1 = "ghi";
In reply to Re^4: sanity check
by jwkrahn
in thread sanity check
by marutcar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |