Well I'll start the responses off with the usual...
use strict; use warnings;
That should give you some interesting feedback to investigate when a script doesn't work ;-)
You could also use chomp on $num and $y to remove carriage returns etc. ie
chomp($num = <STDIN>);
I'm sure there are some more experienced monks who will contribute further.
Also check out some of the tutorials - they're very good.
(So is the O'reilly book - Learning Perl)
In reply to Re: Hozefa
by felonius
in thread Advice on First Perl Script
by hozefa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |