You're correct - the output is as you state. Apologies for the error. I was a bit fuzzy at the end of a long day.
You're also correct about the calls to other subs in other modules. I've had a practice of taking segments of code that I use in several modules or scripts and putting them into subs in another module.
I hadn't seen this "use statement execution" before, though. I've used print statements often when testing out the code I'm putting into a module, to check that the sub is working as intended.
Most of these aren't explicitly conditional print statements, because I want to see what's happening with variables at the point in the sub where the print statement is.
But I don't recall having put a print statement outside of other conditional blocks before. This one was right at the start, before anything else happened - I needed to check to ensure that the sub call was happening.
Thanks for your response. You did clear up something that I was uninformed about with regard to sub-routines and modules.
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.