Please read Markup in the Monastery and use <code> tags when you post code - otherwise, your post becomes mangled by html interpretation.
Also, read How do I post a question effectively?. You did not indicate what problem you were having, or what result you were expecting.
Use better variable names, like $name, $pay, $hours instead of $channeln.
Do not use the obsolete "switch" module.
Here is what I can make of your code - not sure what calculation you were trying:
Output:use strict; use warnings; use diagnostics; use feature "say"; use feature "switch"; use v5.22.1; say "What is your name?"; my $channel1 =<STDIN>; say "How many hours did you work?"; my $channel2 =<STDIN>; say "What is your pay?"; my $channel3 = <STDIN>; chomp for ($channel1,$channel2,$channel3); say $channel1; say "Check Amount = ", (40*$channel3)+(($channel2-40)*$channel3*2);
e$ perl test-channel.pl What is your name? rrr How many hours did you work? 44 What is your pay? 10 rrr Check Amount = 480
Memory fault -- brain fried
In reply to Re: Help with Perl Project please
by NetWallah
in thread Help with Perl Project please
by Draggy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |