in reply to What does my ($data) = @_ mean?

I recommend that you get your hands on some good documentation. Perldoc ("perldoc perl" on your commandline/shell) will be always helpful. I also recommend Beginning Perl (available online), which is a really good book for Perl beginners.

Replies are listed 'Best First'.
Re: Re: What does my ($data) = @_ mean?
by Anonymous Monk on May 18, 2004 at 11:07 UTC
    Had I posted this, I would have lost all my points! Anyway, here is the explaination:

    my = declare a variable.
    $data = variable name.
    () = similar to shift or pop.
    @_ = an array that you populate and send it off to a sub routine or a function.

    Example
    $var = 'some sort of data'; &My_Sub($var); sub My_Sub { my($data) = @_; Print $data . "\n"; } output: some sort of data
    Blackadder