When in slurp mode ... chomp won't remove anything.
Another illustration of the wisdom of local-ized modification of globals in the narrowest scope, e.g.
my $input = do { local $/; <DATA>; };
rather than in broad or, indeed, global scope even when "it's just a small program; it doesn't really matter what we do to globals": spooky action at a distance.
Give a man a fish: <%-{-{-{-<
In reply to Re^4: Modifying pos() from within (?{...})
by AnomalousMonk
in thread Modifying pos() from within (?{...})
by mxb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |