On Tue, 2008-09-30 at 23:17 +0800, Sandy lone wrote: > 2008/9/30 Vyacheslav Karamov <[EMAIL PROTECTED]>: > > > > > > I've made a mistake. Correct code: > > > > 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. -- Just my 0.00000002 million dollars worth, Shawn Linux is obsolete. -- Andrew Tanenbaum -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/