On Tue, May 31, 2005 at 08:05:04AM -0500, david d zuhn wrote:
> If this is indeed a statement that all function calls, especially
> the ordinary sort that are used most often, must be of the form "a(b)"
> rather than allowing "a (b)", this is a pretty fundamental change in
> perl that ought to be made a bit clearer
It's not just function calls. Arrays and hashes require no whitespace
between the name and the subscript unless you use the dot form.
@a[0] # ok
@a.[0] # ok
@a [0] # WRONG
@a .[0] # ok
%h{'k'} # ok
%h.{'k'} # ok
%h {'k'} # WRONG
%h .{'k'} # ok
%h<k> # ok
%h.<k> # ok
%h <k> # WRONG
%h .<k> # ok
Also note that the dot follows the subscript so that the following are
also incorrect:
foo. () # WRONG
@a. [0] # WRONG
%h. {'k'} # WRONG
%h. <k> # WRONG
Unless I'm completely mistaken, in which case someone had better
correct me :-)
> (it's not in the p5->p6 porting guide, for example).
I didn't really realize that there was a p5->p6 porting guide until I
saw this. I'll add something to the guide as above (plus subs).
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]