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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.