Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: If statement not workingby andye (Curate) |
on Aug 24, 2012 at 14:54 UTC ( [id://989562]=note: print w/replies, xml ) | Need Help?? |
It's because of your final statement, here:
(I've tidied it up a bit to make it clearer). What you're saying with that is: So, if any of the statements before that final one match, then 'light pink' won't match and so the ELSE part of that final statement will be executed. e.g. if the colour is 'hot pink' then $trimmedcolr will be set to 'HP' and then set right back to $colr (in the bottom line). HTH!
In Section
Seekers of Perl Wisdom
|
|