, .
use Data::Dumper;
use strict;
my @oneRow = ('Vehicle Factory',
'D3',
'2518, 1613, 1512, 1109, 912 bus, 712 bus, 613 Export',
'ajj137035, mgp657301',
'ddb255570',
'mdb650204'
);
my @newRows;
my $userString = $oneRow[3];
my @userNewRow = split(/,/,$userString);
foreach(@userNewRow) {
$oneRow[3] =~ s/.*/$_/;
push @newRows, [@oneRow];
}
print Dumper \@newRows;
:
$VAR1 = [
[
'Vehicle Factory',
'D3',
'2518, 1613, 1512, 1109, 912 bus, 712 bus, 613 Export',
'ajj137035',
'ddb255570',
'mdb650204'
],
[
'Vehicle Factory',
'D3',
'2518, 1613, 1512, 1109, 912 bus, 712 bus, 613 Export',
' mgp657301',
'ddb255570',
'mdb650204'
]
];
, push :
push @newRows, @oneRow;
:
$VAR1 = [
'Vehicle Factory',
'D3',
'2518, 1613, 1512, 1109, 912 bus, 712 bus, 613 Export',
'ajj137035',
'ddb255570',
'mdb650204',
'Vehicle Factory',
'D3',
'2518, 1613, 1512, 1109, 912 bus, 712 bus, 613 Export',
' mgp657301',
'ddb255570',
'mdb650204'
];
, .
, :).