- or download this
my @col = split /;/;
push @col, '' for @col .. 2;
print join ';', @col;
- or download this
my $len = 3;
print join ';', (split(/;/), ('') x $len)[0 .. $len-1];
- or download this
my %foo =
map { (split /:/, $_, 2)[0, 1] } # Implicit "default" undef.
...
'foo' => 'bar',
'zip' => 'zap:zoom'
};
- or download this
my %foo = map { split /:/ } ...;