On Tue, Sep 30, 2008 at 11:40:21AM -0400, Mr. Shawn H. Corey wrote:
> On Tue, 2008-09-30 at 23:17 +0800, Sandy lone wrote:
> > 2008/9/30 Vyacheslav Karamov <[EMAIL PROTECTED]>:
> > 
> > > sub SomeFunc
> > > {
> > >   my $node = shift @_;
> > 
> > or:
> > my $node = shift;    # shift get @_ as the default arguments
> 
> No.
> 
> Inside a sub, shift without a parameter will shift @_.  Outside a sub,
> it will shift @ARGV.  Since it does two different things in different
> context, always give it a parameter.  Things that do different things
> should look different.

No.

Or, more charitably, your first two sentences are (mostly) correct but I
think you might find yourself fighting a losing battle with the last
two, both philosophically and with your specific suggestion.

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to