in reply to Help with Perl Project please

Welcome to the Monastery !

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:

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);
Output:
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

Replies are listed 'Best First'.
Re^2: Help with Perl Project please
by Draggy (Initiate) on Jul 06, 2018 at 07:32 UTC
    Thank You very much and I will check out those articles
      Hi Draggy,

      you've been kindly requested to use <code> and </code> tags for your code, and you obviously saw that request since you answered that post. Please amend your post accordingly. This will give all of us a better chance to help you.