in reply to Re: local and global variable?
in thread local and global variable?
... 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'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: local and global variable?
by Marshall (Canon) on Aug 22, 2011 at 13:29 UTC | |
|
Re^3: local and global variable?
by Jim (Curate) on Aug 22, 2011 at 17:36 UTC |