Anonymous Hash
From: quartet (travisq_at_gmail.com)
Date: 01/28/05
- Next message: Paul Lalli: "Re: Anonymous Hash"
- Previous message: Bernard Cosell: "Multiple POD docs from a single .pl file?"
- Next in thread: Paul Lalli: "Re: Anonymous Hash"
- Reply: Paul Lalli: "Re: Anonymous Hash"
- Reply: A. Sinan Unur: "Re: Anonymous Hash"
- Reply: Chris Mattern: "Re: Anonymous Hash"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Jan 2005 06:30:55 -0800
I am using the following script to output the data structure below:
#!/usr/bin/perl -wT
use Data::Dumper;
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.
- Next message: Paul Lalli: "Re: Anonymous Hash"
- Previous message: Bernard Cosell: "Multiple POD docs from a single .pl file?"
- Next in thread: Paul Lalli: "Re: Anonymous Hash"
- Reply: Paul Lalli: "Re: Anonymous Hash"
- Reply: A. Sinan Unur: "Re: Anonymous Hash"
- Reply: Chris Mattern: "Re: Anonymous Hash"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|