$VAR1 = {
'WaterSports' => [
'8765',
[
'Drysuit',
'r',
'M-L'
]
'8365',
[
'Paddle',
't',
'45'
]
]
};
####
$VAR1 = {
'WaterSports' => [
'8765',
[
'Drysuit',
'r',
'M-L'
]
};
$VAR1 = {
'WaterSports'=> [
'8365',
[
'Paddle',
't',
'45'
]
]
};
##
##
open(INFILE, "products-id.txt")|| die "Cannot open products-id.txt file";
open (OUTPUT,">$output") or die ("Can't open file $output $!");
chomp(my @ProductArray = map { /^\s*$/ ? () : $_ } );
close (INFILE);
foreach my $line(@ProductArray)
{
my ($Category, $ID, $Name, $Type, $Size) = split( / /, $line );
%AllProducts = ($Category => [$ID, [$Name, $Type, $Size]]);
print OUTPUT Dumper(\%AllProducts);
}