Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
However, I keep getting "Can't call method {} on unblessed reference"foreach $argnum (0..$#ARGV){ print "$ARGV[$argnum]\n"; my $xpath=$ARGV[$argnum]; $xpath =~ s/\//}->{/g; eval ($xpath = "{" . $xpath . "}"); #xpath variable should becode like: $ret->{link}->{rel} print ${$ret->$xpath}; }
I've also read that symbolic references are bad, so is there a better way to accomplish what I'm trying to do?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Symbolic references
by LanX (Saint) on Apr 15, 2013 at 04:35 UTC | |
by Anonymous Monk on Apr 15, 2013 at 05:31 UTC | |
by LanX (Saint) on Apr 15, 2013 at 05:53 UTC | |
by Anonymous Monk on Apr 15, 2013 at 06:57 UTC | |
by Anonymous Monk on Apr 15, 2013 at 07:05 UTC | |
| |
|
Re: Symbolic references (diver)
by tye (Sage) on Apr 15, 2013 at 05:34 UTC | |
|
Re: Symbolic references
by kcott (Archbishop) on Apr 15, 2013 at 12:41 UTC |