>>>>> "DJ" == David Jacopille <[email protected]> writes:
DJ> To get highest index number on an array you use:
DJ> $#array
DJ> Doing this on an arrayref:
DJ> $#{arrayref}
that is a bareword and not an array ref. so perl is parsing $# as the
deprecated builtin variable
DJ> I get a warning "$# is no longer supported". The program does
DJ> continue.
DJ> Apparently $# and $* were deprecated in regular expression context
DJ> and that error message exactly is documented in CPAN.
these work fine:
perl -lwe '$x = [1,2]; print $#$x'
1
perl -lwe '$x = [1,2]; print $#{$x}'
1
uri
--
Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com --
------------ Perl Developer Recruiting and Placement Services -------------
----- Perl Code Review, Architecture, Development, Training, Support -------
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/