Q
quartet
I am using the following script to output the data structure below:
#!/usr/bin/perl -wT
use Data:
umper;
use FindBin qw($Bin);
use XML::Simple;
use strict;
my ($data,$xml,$VAR1);
#$xml = new XML::Simple (KeyAttr=>'sku', forcearray=>'1');
$xml = new XML::Simple (forcearray=>'1');
$data = $xml->XMLin("$Bin/some.xml");
print Dumper($data);
print "\n";
output:
$VAR1 = {
'JOB' => [
{
'MAXRUNS' => '0',
'APPLICATION' => 'MANUGISTICST',
'MAXDAYS' => '0',
'MAR' => '1',
'TASKTYPE' => 'Job',
'FEB' => '1',
'NOV' => '1',
'INTERVAL' => '0M',
'DATACENTER' => 'EM61',
'CONFIRM' => '0',
'MAY' => '1',
'TIMETO' => '0105',
'OCT' => '1',
'QUANTITATIVE' => [
{
'QUANT' => '1',
'NAME' => 'SYSTEM'
},
{
'QUANT' => '1',
Can someone tell me why its neccessary to use '%$' for referncing the
hash, I want to access all the values in the anonymous hash.
#!/usr/bin/perl -wT
use Data:
use FindBin qw($Bin);
use XML::Simple;
use strict;
my ($data,$xml,$VAR1);
#$xml = new XML::Simple (KeyAttr=>'sku', forcearray=>'1');
$xml = new XML::Simple (forcearray=>'1');
$data = $xml->XMLin("$Bin/some.xml");
print Dumper($data);
print "\n";
output:
$VAR1 = {
'JOB' => [
{
'MAXRUNS' => '0',
'APPLICATION' => 'MANUGISTICST',
'MAXDAYS' => '0',
'MAR' => '1',
'TASKTYPE' => 'Job',
'FEB' => '1',
'NOV' => '1',
'INTERVAL' => '0M',
'DATACENTER' => 'EM61',
'CONFIRM' => '0',
'MAY' => '1',
'TIMETO' => '0105',
'OCT' => '1',
'QUANTITATIVE' => [
{
'QUANT' => '1',
'NAME' => 'SYSTEM'
},
{
'QUANT' => '1',
Can someone tell me why its neccessary to use '%$' for referncing the
hash, I want to access all the values in the anonymous hash.