Looking for a cleaner (possibly one liner) way to write the following
my $spec_2d = ( );
foreach ( @spec ) {
$spec_2d[$_][0] = $spec[$_];
}
@spec = @spec_2d;
Basically I'm making an array an array of arrays
Looking for a cleaner (possibly one liner) way to write the following
Basically I'm making an array an array of arrays |
|||
|