$_ and @_

What does these two symbols mean:

$_ and [at] _
David Wolf [ Mo, 31 Oktober 2005 20:50 ] [ ID #1037817 ]

Re: $_ and @_

david wolf wrote:
> What does these two symbols mean:
>
> $_ and [at] _

They are very fundamental in how perl operates.
You can find their definition in any tutorial on perl.
http://learn.perl.org
-Joe
Joe Smith [ Mo, 31 Oktober 2005 20:53 ] [ ID #1037818 ]

Re: $_ and @_

david wolf wrote:
> What does these two symbols mean:
>
> $_ and [at] _

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

[at] _ is the array that contains the arguments passed to the current
subroutine.

Read more about them in
perldoc perlvar
and
perldoc perlsub

Paul Lalli
Paul Lalli [ Mo, 31 Oktober 2005 22:06 ] [ ID #1037819 ]

Re: $_ and @_

you guys are great, very helpful.

Thanks !!!
David Wolf [ Di, 01 November 2005 17:25 ] [ ID #1039371 ]
Perl » alt.perl » $_ and @_

Vorheriges Thema: how to read fixed length records in perl
Nächstes Thema: problem with executing linux program in perl