in reply to capturing stderr of echo piped to a file
Here is how I've done it in test files:
I can't remember where I first saw that, but I've kept it handy ever since.# Capture any STDERR output my $stderr = ''; local *STDERR; open STDERR, '>', \$stderr;
You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.
In Section
Seekers of Perl Wisdom