in reply to Please Help With Perl
Line 2 for the first question should be:
foreach(@this_array) {
... because @this_array and $this_array are different and unrelated variables.
And for the other question, line 2 should be:
%car_hash = reverse(%car_hash);
... again because $car_hash and %car_hash are different variables, but also because reverse() returns the reversed hash, so you need to assign it somewhere.
I'm surprised the exam questions contain such basic errors.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Please Help With Perl
by marto (Cardinal) on May 21, 2013 at 10:36 UTC |