I was going over a Perl script written by someone else and I am not too familiar with Perl so could someone let me know what do the first three lines do?
my $ref = do($filename);
$ref != 0 or die "unable to read/parse $filename\n";
@varLines=@{$ref};
foreach $ord (@varLines)
{
# code here
}
This is in the beginning of the program after the $filename
is set with getting the commandline arguments
The format of the file being passed to this script is
[
{
"Key1" => "val1",
"key2" => " "A",
},
{
"Key3" => "val2",
"key4" => " "B",
},
]