in reply to use re 'debug';, scope, and output

Update: Nope, I was wrong, this doesn't work.

=========

tl;dr: Change the order:

{ open STDERR, '>', 'err.txt' or die $!; open STDOUT, '>', 'out.txt' or die $!; use re 'debug'; $string =~ s/\bd\"//g; }

Also note that this method may interfere with other output in a real program.

-QM
--
Quantum Mechanics: The dreams stuff is made of

Replies are listed 'Best First'.
Re^2: use re 'debug';, scope, and output
by Anonymous Monk on Jul 14, 2015 at 10:02 UTC
    the order is irrelevant, use happens at compile time, and "COMPILE" diagnostic gets printed at compile time (same time pattern gets compiiled), way before the open STDERR... take effect