valentin has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
my question is two folded:
1. What is the difference between ${$x."::VERSION"} and ${"$x::VERSION"}?
2. Why is $y undefined in the first example?
3. Why does perl think $y is a filehandle in the second example?
1. What is the difference between ${$x."::VERSION"} and ${"$x::VERSION"}?
2. Why is $y undefined in the first example?
3. Why does perl think $y is a filehandle in the second example?
perl -MFile::Find -we '$x='File::Find'; print ${ $y = "$x::VERSION" } +print $y'
perl -MFile::Find -we '$x='File::Find'; print ${ $y = $x."::VERSION" } + print $y'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: computed symbol references
by gellyfish (Monsignor) on Jul 13, 2004 at 13:16 UTC | |
Re: computed symbol references
by broquaint (Abbot) on Jul 13, 2004 at 13:23 UTC | |
Re: computed symbol references
by dragonchild (Archbishop) on Jul 13, 2004 at 13:21 UTC | |
Re: computed symbol references
by valentin (Abbot) on Jul 13, 2004 at 13:50 UTC |
Back to
Seekers of Perl Wisdom