in reply to passing token output to a variable
to see your program how perl sees it run
perl -MO=Deparse,-p foo.pl
Then write that expression as
( $cleaned = $token->as_is ) =~ s/\s{2,}/ /gs;
parens force assignment before substitution
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passing token output to a variable (parens force assignment before substitution)
by SilverShadow (Initiate) on Jan 06, 2013 at 18:51 UTC |