in reply to please explain some code
what does & mean in this line of code ?
To Perl, it means "ignore the prototype". To some people, it seems to mean something else I don't know.
Why is variable $dir surrounded by () ?
my $dir = @_; would assign the number of elements in @_ to $dir.
What does [my (@dirs,$list);] do ?
A short way of writing
my @dirs; my $list;
Usually we declare list in bracket on right hand side and that contains values.
This makes no sense. For starters, you can't declare lists since they're not variables.
Where can I find more details about this code ?
A question of my own: Why do you add a space in front of every "?"?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: please explain some code
by manishrathi (Beadle) on Jul 18, 2011 at 10:21 UTC | |
by happy.barney (Friar) on Jul 18, 2011 at 11:39 UTC |