in reply to parse xml and store data in array of hashesh
#!/usr/bin/perl -- use strict; use warnings; my %foo = 1..2; my @bar = %foo; push @bar, \%foo; use Data::Dumper; print Dumper( \@bar ); __END__ $VAR1 = [ '1', 2, { '1' => 2 } ];
See the \ operator takes a reference, to an array (\@array), to a hash (\%hash), to a scalar (\$scalar)
See Tutorials: References quick reference
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: parse xml and store data in array of hashesh
by osprofi (Initiate) on Jul 23, 2011 at 07:52 UTC | |
by Anonymous Monk on Jul 23, 2011 at 08:44 UTC |