huchister has asked for the wisdom of the Perl Monks concerning the following question:
On my upgrade system, one of my hash statement fails to execute.
Declaring two variables,
my( $rxml, $ob ) = @{%$self}{qw/rxml rxml_ob/};
Above statement not seems to be working anymore.
I'm currently using perl v5.8.8.
Should I separate $rxml, $ob values? or would there be alternative solution to make this statement to be compatible with current perl version.
UPDATE(3/12/2013): Problem solved.
For more information,
$self contains:
Problematic line:
Can't use string ("30/64") as a HASH ref while "strict refs" in use at
Solution:
It seems first statement wasn't even working at 5.8.8 and do not provide any strict ref errors. 5.10.1, perl seems became more strict about this.
Thanks to cristofo and Anamolusmonk for clarification and answer to my question promptly,
(though I gave out the limit amount of info, these guys nailed down my problem and guided me to right direction. also, I thank you all for your prompt attention!)
Declaring two variables,
my( $rxml, $ob ) = @{%$self}{qw/rxml rxml_ob/};
Above statement not seems to be working anymore.
I'm currently using perl v5.8.8.
Should I separate $rxml, $ob values? or would there be alternative solution to make this statement to be compatible with current perl version.
UPDATE(3/12/2013): Problem solved.
For more information,
$self contains:
my $self = bless( { 'rxml' => 'test', 'rxml_ob' => 'test2' } );
Problematic line:
While I upgrade perl version from 5.8.8 to 5.10.1 gives me this error.my( $rxml, $ob ) = @{%$self}{qw/rxml rxml_ob/};
Can't use string ("30/64") as a HASH ref while "strict refs" in use at
Solution:
Disgard % hash sign.my( $rxml, $ob ) = @{$self}{qw/rxml rxml_ob/};
It seems first statement wasn't even working at 5.8.8 and do not provide any strict ref errors. 5.10.1, perl seems became more strict about this.
Thanks to cristofo and Anamolusmonk for clarification and answer to my question promptly,
(though I gave out the limit amount of info, these guys nailed down my problem and guided me to right direction. also, I thank you all for your prompt attention!)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Hash statement problem.
by Cristoforo (Curate) on Mar 11, 2013 at 19:53 UTC | |
Re: Hash statement problem.
by AnomalousMonk (Archbishop) on Mar 12, 2013 at 01:13 UTC | |
by huchister (Acolyte) on Mar 12, 2013 at 15:03 UTC | |
Re: Hash statement problem.
by kcott (Archbishop) on Mar 11, 2013 at 20:53 UTC | |
by Anonymous Monk on Mar 11, 2013 at 20:56 UTC | |
Re: Hash statement problem.
by Anonymous Monk on Mar 11, 2013 at 19:52 UTC | |
Re: Hash statement problem.
by blue_cowdawg (Monsignor) on Mar 11, 2013 at 20:32 UTC | |
Re: Hash statement problem.
by sundialsvc4 (Abbot) on Mar 11, 2013 at 21:39 UTC | |
by huchister (Acolyte) on Mar 12, 2013 at 14:58 UTC |
Back to
Seekers of Perl Wisdom