Do you know where your variables are? | |
PerlMonks |
Re: How do I assign & substitute in one statement?by dimar (Curate) |
on Nov 13, 2004 at 03:10 UTC ( [id://407583]=note: print w/replies, xml ) | Need Help?? |
You can also use parenthesis to impose 'list context', and then combine that with 'map' to get what you want in a single line. The drawback is you have to shoehorn your string into a list, which is a bit artificial. The benefit is this may be a little bit easier to read and understand what is going on for beginning perl programmers.
In Section
Seekers of Perl Wisdom
|
|