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