Hi,

For calling subroutines and passing arguments on I use e.g.

my ( $var1, $var2 ) = @_;

If I have only one argument, this is also ok:

my ( $var1) = @_;

But why does 

my $var1 = @_;

not work? In 'perldoc perlsub' I read that I only have to use
parentheses when defining more than one variable. When using the latter
code, the value of $var1 is "1", seems to be the number of elements
passed by @_. Please enlighten me or give me a hint what keywords to
search for.

Thanks, 
Nora 



Reply via email to