in reply to Re^2: hash dereferencing issue with perl 5.16.3
in thread hash dereferencing issue with perl 5.16.3
As far as identifying them goes, you could grep your files for ${%{$ . That sequence of characters isn't likely to show up anywhere else except in these constructs.
Automating a change would be more tricky, but could probably be done. Something like this which you could filter all problem files through:
#!/usr/bin/env perl use strict; use warnings; while(<DATA>){ print "before: $_";; s|\${%{\$(\w+)}}{'(\w+)'}|\$${1}->{'$2'}|g; print " after: $_";; } __DATA__ my $lValue = ${%{$lHashRef}}{'a'};
That might not work on all your variable names or if some are formatted a bit differently, but it could be a start.
Aaron B.
Available for small or large Perl jobs and *nix system administration; see my home node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: hash dereferencing issue with perl 5.16.3
by AnomalousMonk (Archbishop) on May 03, 2015 at 05:42 UTC | |
by aaron_baugher (Curate) on May 03, 2015 at 08:29 UTC | |
by Anonymous Monk on May 03, 2015 at 07:52 UTC | |
by AnomalousMonk (Archbishop) on May 03, 2015 at 23:41 UTC |