in reply to variable declaration question
Strictly speaking, the way you've presented the above not much except you fingers are slightly more tired. That said consider the following code:
In the above example I have an array on the LHS and an array on the RHS. This is equivalent to:sub marine { my ($fore,$mid,$aft) = @_; }
When coding parens, just like in written English, are used to group things together.sub marine { my $fore = $_[0]; my $mid = $_[1]; my $aft = $_[2]; }
Clear as mud?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: variable declaration question
by muba (Priest) on Jan 18, 2013 at 22:39 UTC |