in reply to Store result of split directly to variable(s)
c:\@Work\Perl>perl -wMstrict -le "my $s = 'foo: notwantedonvoyage: bar'; my ($foo, undef, $bar) = split /: /, $s; print qq{'$foo' '$bar'}; " 'foo' 'bar'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Store result of split directly to variable(s)
by Perl_Ally (Novice) on Aug 22, 2014 at 16:54 UTC |