... my @species = split "//", $list;. The @species array will contain each letter of $list (a split on the null string ...
Splitting on "//" does not split on the null string, but rather on the literal sequence of two forward-slash characters.
>perl -wMstrict -le "my $s = 'foo//bar//baz'; my @species = split qq{//}, $s; printf qq{'$_' } for @species; " 'foo' 'bar' 'baz'
In reply to Re^2: local and global variable?
by AnomalousMonk
in thread local and global variable?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |