In a message dated 3/3/2004 5:15:57 AM Eastern Standard Time, 
[EMAIL PROTECTED] writes:
>testsub(@abc, $x, $y);
>
>sub testsub(@$$)
>{
>    (@abc, $x, $y) = @_;
>    print "Array @abc\n";
>    print "x $x\n";
>    print "y $y\n";
>}

sub testsub ([EMAIL PROTECTED]);
@abc = (1, 2, 3);
$x = 3;
$y = 4;
testsub @abc, $x, $y; #parens now optional

sub testsub([EMAIL PROTECTED])
{
    my ($abc, $x, $y) = @_; # @abc is reference to array @abc
    print "Array", @$abc, "\n";
    print "x ", $x, "\n";
    print "y ", $y, "\n";
}


-will
(the above message is double rot13 encoded for security reasons)

Most Useful Perl Modules
-strict
-warnings
-Devel::DProf
-Benchmark
-B::Deparse
-Data::Dumper
-Clone (a Godsend)
-Perl::Tidy
-Beautifier

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to