There's more than one way to do things | |
PerlMonks |
Re: Perl::Critic says don't modify $_ in list functions and other thingsby Lady_Aleena (Priest) |
on Jul 09, 2020 at 19:08 UTC ( [id://11119106]=note: print w/replies, xml ) | Need Help?? |
I have updated my code to the following based on suggestions in this thread and chatterbox. With so much wondeful help, I didn't know who to reply to.
...has become...
It appears that explicitely using chomp($_) is what was the problem. The following code is now a lot simpler once I put the regex into the subroutine instead of munging it in the map.
...has become...
With the use of /r and a chain of regexen, I was able to change the map.
...has become...
And Fancy::Map got a complete overhaul with help.
...has become...
My only unfinished business with Perl::Critic set on gentle is my two eval(EXPR). I haven't figured out a fix for that at the moment. Does eval BLOCK act differently than eval EXPR? Also, please note my updated signature! 8) My OS is Debian 10 (Buster); my perl versions are 5.28.1 local and 5.16.3 or 5.30.0 on my web host depending on the shebang. No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
In Section
Seekers of Perl Wisdom
|
|