in reply to Shorter Code
I don't see any logical reason to combine them, but they can be shortened with the modifier form of the loop:
If such a substitution is a common operation, you could make a subroutine that modifies its operands:s/i_// for @info; s/d_// for @data;
# Usage: erase STRING, LIST sub erase { my $re = quotemeta shift; s/$re//g for @_; 1; }
After Compline,
Zaxo
|
|---|