On 11/1/11 Tue Nov 1, 2011 12:02 PM, "rent0n" scribbled:
> Hi all,
>
> Can somebody please explain what is the difference between:
>
> sub subroutine {
> my $var = @_;
> ...
> return 1;
> }
>
> and:
>
> sub subroutine {
> my ($var) = @_;
> ...
> return 1;
> }
>
> I think it's something rel
On 11/01/2011 03:02 PM, rent0n wrote:
Hi all,
Can somebody please explain what is the difference between:
sub subroutine {
my $var = @_;
that puts @_ in a scalar context which returns the number of elements in
an array.
...
return 1;
}
and:
sub subroutine {
my ($var) = @_;
...
that puts
Hi all,
Can somebody please explain what is the difference between:
sub subroutine {
my $var = @_;
...
return 1;
}
and:
sub subroutine {
my ($var) = @_;
...
return 1;
}
I think it's something related to the context but I'm not completely
sure.