Observing the output of Data::Dumper, the specifiers ($VAR1
, ""
, ;
) are not explained in the CPAN documentation.
$VAR1
?Here is my output:
$VAR1 = "Snow";
$VAR1 = "Rain";
$VAR1 = "Sunny";
$VAR1 = "";
Looks like you have an array:
my @arr = ('Snow','Rain','Sunny');
print Dumper(@arr);
When you pass the array, Dumper thinks you passed 3 separate variables. That is why you get:
$VAR1 = 'Snow';
$VAR2 = 'Rain';
$VAR3 = 'Sunny';
In order to see the array as data structure, you need to pass the reference to the array:
print Dumper(\@arr);
This will produce:
$VAR1 = [
'Snow',
'Rain',
'Sunny'
];
The output says that you passed the reference to array with 3 elements.