It takes the first element of the array that's being passed to it. Example:
#!/usr/bin/perl go ( "foo", "bar", "baz" ); sub go { my ($data) = @_; print $data; }
This will print "foo".
Update: Maybe this snippet from perldoc perlvar is interesting for you:
@_ Within a subroutine the array @_ contains the
parameters passed to that subroutine. See perl-
sub.
In reply to Re: What does my ($data) = @_ mean?
by b10m
in thread What does my ($data) = @_ mean?
by chiburashka
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |