in reply to Re^12: Compare 2 XML files
in thread Compare 2 XML files
In that case you will need to alter the inner hashrefs, not the outer array, viz:
#!/usr/bin/env perl use strict; use warnings; use Data::Dumper; my @eventrecords = ( { eventid => 2667 }, { eventid => 2666 }, { eventid => 2656 } ); for my $i (0 .. $#eventrecords) { $eventrecords[$i]->{line} = $i + 1; } print Dumper \@eventrecords;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^14: Compare 2 XML files
by snehit.ar (Beadle) on Jul 12, 2017 at 13:45 UTC |