SPUG: Precedence question

Yitzchak Scott-Thoennes sthoenna at efn.org
Mon Jan 22 11:17:14 PST 2007

> does @$foo[3] parse as (@$foo)[3] or @{$foo[3]}?

The former.  You can easily verify this yourself with:

$ perl -we'use strict; my $foo; ()=@$foo[3]'

$ perl -we'use strict; my @foo; ()=@$foo[3]'
Global symbol "$foo" requires explicit package name at -e line 1.
Execution of -e aborted due to compilation errors.

I'm looking for a job: http://perlmonks.org/?node=ysth#looking

More information about the spug-list mailing list