[Gllug] re: OSS CMSs
Anthony Newman
anthony.newman at uk.clara.net
Fri Apr 29 16:00:31 UTC 2005
David Damerell wrote:
>
> Well, the intention is to demonstrate the effect of push, which can
> hardly be done in terms of push.
>
> That said, some constructions involving $# are useful, but utterly
> perverse to anyone who doesn't make regular use of them.
>
Some constructions using the subtle nuances of Perl's list and scalar
context are utterly perverse if you've never seen them before, but if
you've never widely seen a language in use before, or don't make regular
use of same, should you really be attempting to maintain, say,
mission-critical code written using it without a good reference manual
at your side?
I have to say I'd use push() under this circumstance, because using $#
saves very little in the way of effort, and push is likely to do the
same thing predictably in future when my code becomes legacy material.
Ant
P.S.
$array[++$#array] = $_ for @list;
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list