G'day Draggy,
Welcome to the Monastery.
As already pointed out by ++NetWallah,
there are issues with your post which make it difficult to read
and leave us guessing what your actual problem is.
Here's some problems I can see:
-
A number of your statements are not properly terminated.
You'll need to add semi-colons in various places.
-
For "use v5.22.1", write "use 5.022_001" instead.
See use for an explanation of why you should do this.
Put it as your first statement (and add a semi-colon).
This will automatically do "use strict;" and "use feature "say";" for you:
you can remove those two statements from your code.
-
The switch feature is experimental.
See "perlsyn: Switch Statements"
and the recent discussion here: "Will 'when()' be removed or deprecated in upcoming version of Perl?".
As per the previous point, "use 5.022_001;" will enable that feature anyway so you don't need that code.
You don't appear to be using that feature in your posted code; continue to not use it.
-
With Q&A code, you're generally better off using "print 'Prompt: '; than "say 'Prompt: ';.
The user gets to type the response immediately after the prompt, not below it.
-
And the last bit you posted: "say Check Amount = $[(40*$channel3)+(($channel2-40)*$channel3*2)]"!
Missing quotes; missing terminator;
$[ is already a special variable that is part of the core language
but I get the impression you're trying to use a construct like "$[...]".
This part needs a lot of work!
Just in closing, I might add that, when posting here, typing your code by hand is not a good idea.
I don't know if you are.
If you copy and paste the actual code you're trying to run,
we can see a verbatim copy and help you better.
And, of course, post any code, data, and similar text between <code>...</code> tags.