submersible_toaster has asked for the wisdom of the Perl Monks concerning the following question:
OK , it's petty and odd but this has piqued my curosity enough that I just cannot let go. After reading Perl6 Headaches? and the associated discussion of the . and the _ , specifically how the new concatenation operator would need to be de-ambigufied (sp.) with a leading whitespace ie $foo _ $bar , or $foo _$bar.
So what? Well lets come back to perl5 concatenation.
print $foo.$bar
does what I expect concatenation to do.
BUT
print $foo.bar.how.is.my.syntax
I would have expected to be a syntax error, admittedly it spews warnings if -w is specified , and it certainly won't pass strict.
The question? Could someone explain what . is doing to it's left and right values, throwing a theoretical qq/ / around them? Of course if a sub bar {} had been declared then .bar concatenates the return value of &bar().
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax Explanation PLs
by Paladin (Vicar) on Jan 07, 2003 at 05:46 UTC | |
|
Re: Syntax Explanation PLs
by djantzen (Priest) on Jan 07, 2003 at 05:52 UTC | |
by submersible_toaster (Chaplain) on Jan 07, 2003 at 07:01 UTC |