in reply to Why is this incorrect?
In looking at your code, the first thing I noticed was your line 3:
my $text, $ques, $ans;Right away you should have gotten an error about globals needing explicit package name. To declare multiple variables you need to enclose them in parenthese:
my ($text, $ques, $ans);The same problem exists on line 20:
my $another_line, $one, $two;Next, you have:
sub $do_one_thing{...;which is also an error. You need to remove the sigils from this and the subsequent sub.
From what you've shown, I can't imagine this program producing any output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is this incorrect?
by kettle (Beadle) on Mar 17, 2006 at 07:13 UTC |