$_ and @_

$_ and @_

am 31.10.2005 20:50:16 von David Wolf

What does these two symbols mean:

$_ and @_

Re: $_ and @_

am 31.10.2005 20:53:44 von Joe Smith

david wolf wrote:
> What does these two symbols mean:
>
> $_ and @_

They are very fundamental in how perl operates.
You can find their definition in any tutorial on perl.
http://learn.perl.org
-Joe

Re: $_ and @_

am 31.10.2005 22:06:27 von Paul Lalli

david wolf wrote:
> What does these two symbols mean:
>
> $_ and @_

$_ is the "default" variable for many, many built-in functions and
control structures (print, foreach, stat, chomp, =~, grep, map, to name
a few).

@_ is the array that contains the arguments passed to the current
subroutine.

Read more about them in
perldoc perlvar
and
perldoc perlsub

Paul Lalli

Re: $_ and @_

am 01.11.2005 17:25:24 von David Wolf

you guys are great, very helpful.

Thanks !!!