throop has asked for the wisdom of the Perl Monks concerning the following question:
Brethern
Until recently, I've written calls to my subroutines with an ampersand, e.g.
But Perl Best Practices (p 175) sez Call subroutines with parentheses but without a leading &@livesys = sort &Con::liveones;
I'm running a decrepit Perl, for reasons beyond my control - (5.0 patchlevel 4 subversion 4) and this may be part of my problem, but when I write
I get an empty array. I can work around this (starting with 'If its not broke dont fix it' - leaving the code alone. Or putting the result in a temporary variable, etc.) But what's the Best Practice way?@livesys = sort Con::liveones();
throop
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dropping the ampersand
by ikegami (Patriarch) on Feb 09, 2007 at 21:42 UTC | |
by diotalevi (Canon) on Feb 10, 2007 at 00:45 UTC | |
Re: Dropping the ampersand
by kyle (Abbot) on Feb 09, 2007 at 20:54 UTC | |
Re: Dropping the ampersand
by imp (Priest) on Feb 09, 2007 at 21:12 UTC | |
Re: Dropping the ampersand
by kwaping (Priest) on Feb 09, 2007 at 22:12 UTC |
Back to
Seekers of Perl Wisdom