Excellent, thanks for the clear answers. I've been coding Java for the last 2 years, and feel lost :) Thanks again !
On 11/14/05, Bob Showalter <[EMAIL PROTECTED]> wrote: > > Dylan Stamat wrote: > > No, not the routine that deals with Arrays ! > > > > I see code like the following, everywhere: > > my $coolvariable = shift; > > > > Why is a new scalar being assigned to "shift" ? > > New to Perl... sorry for the lame question, but couldn't find an answer > > anywhere. > > shift is a built-in function. It's documented under > > perldoc -f shift > > It removes and returns the first element from an array. When called (as > in this case) without an explicit array, it defaults to either @ARGV (if > called outside of any sub), or @_ (if called within a sub). >