in reply to What does my ($data) = @_ mean?
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.
|
|---|