in reply to Question about ":"

... and the “()” is simply Perl’s required syntax for specifying more-than-one variable name in a my declaration.   (Don’t ask me why.)

Replies are listed 'Best First'.
Re^2: Question about ":"
by Anonymous Monk on Jan 04, 2011 at 02:58 UTC
    Because the manual says so :) and because you can write
    (my $stuff: bar, undef, $glo : bal, my $ra : men ) = @_; my ( $d, $a, $n, $d, $i, $e, $s ) : dandies = @_;
    it would be tedious to have to use (my($stuff):bar...
Re^2: Question about ":"
by DStaal (Chaplain) on Jan 04, 2011 at 15:48 UTC

    Because you are specifying a list of variables, and () denotes a list.