I am still of the opinion that you have not run this code.
So, try running the code you have shown here and post the prompts, the first and last values you enter and the output including any error messages.
Of course, if you do actually run it, the problem might become obvious.
The code you posted that I'm referring to is:
#!/usr/bin/perl -w use strict; use warnings; print "Enter first Number: "; my $ipa = <STDIN>; print "Enter last Number: "; my $ipb = <STDIN>; my $ipc = $ipa +1; while ($ipc <= $ipb) { $ipc; print $ipc; } # my @range = ($ipa, $ipb); if ($ipc < $ipb){ @range = ($ipa, $ipb); unshift(@range, $ipc); } else { print $ipc; } sub ascend { $ipa = $ipb; } my @rl = sort ascend @range; print join(",",@rl);
As already noted by GrandFather, you've updated your post with notification; so this provides a point of reference should you choose to do that again.
-- Ken
In reply to Re^3: Adding Numbers
by kcott
in thread Adding Numbers
by NastyPenguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |