First off, thanks everyone for the good explanations. I'll read up more on the
join function. And also in what situations I'm forcing a list into a scalar context.
Second, the title was meant to say, 'A simple, "why?"' but the HTML overlooked the quotes when rendered. Oops -- is there an HTMLmonks.org? Haha...
Lastly, two more questions!
- Why then, don't I see a space on the print out with my second version? My guess is that it is there - albeit at the end and therefor not seen?
- Why did my second version reverse the element, i.e. THIRD => DRIHT, and also reverse the list? Almost as if I used two reverse statements; first one in a scalar context, then a second on the list itself.
Again, thanks everyone for the help.
-- Just another Perl slacker
Steampunk.
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.