Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Why is this incorrect?by spiritway (Vicar) |
on Mar 17, 2006 at 04:13 UTC ( [id://537381]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|