I've noticed that
my ($a,$b,$c) = "TRUE";
doesn't work
The reason it doesn't work is that
my ($a,$b,$c) is, because of the (), effectively an array. Since "true" is a single element, its equivalent to doing
my @badger="true";
foreach (@badger){print "$_\n"}
The following
my ($a,$b,$c) = ("TRUE", "TRUE", "TRUE");
works OK, because the variables on both side of the '=' are arrays - note the ()
Note that I'm not advocating using this last syntax. I agree with diotalevi that it potentially introduces a bug if you don't use enough "TRUE" values. Personally, I favour jdporters syntax, I'm just pointing out why your original failed.
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.