whilst the code is run it only replaced the strings that contain light pink excluding everything else? please can someone help me fix this? Thank you :)if ($colr =~'baby blue') { $trimmedcolr = 'BB'; } if ($colr =~'baby pink') { $trimmedcolr = 'BP'; } if ($colr =~'dark blue') { $trimmedcolr = 'DB'; } if ($colr =~'dark purple') { $trimmedcolr = 'DP'; } if ($colr =~'hot pink') { $trimmedcolr = 'HP'; } if ($colr =~'light purple') { $trimmedcolr = 'LP'; } else { ($trimmedcolr = $colr) }
In reply to If statement not working by perlnoobster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |