Being somewhat map challenged, I didn't really grasp what's happening until I tried it this way. Maybe this will help to clarify for someone:
my @strings = qw(boy FALSE bird); @strings = map { unless (/FALSE/) { "\"$_\"" }else{$_}} @strings;
In reply to Re: using map with compound code blocks to alter strings: a strange result
by hangon
in thread using map with compound code blocks to alter strings: a strange result
by jbullock35
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |