Keep It Simple, Stupid | |
PerlMonks |
Re: Python dict to perl hashby Tux (Canon) |
on Mar 30, 2015 at 11:46 UTC ( [id://1121805]=note: print w/replies, xml ) | Need Help?? |
$x =~ s/['\s+]//g; is most likely not doing what you think it does. You might mean s{(?:'|\s+)}{}, but what if any of the dict entries has a quote, a comma of whitespace in general? Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom
|
|