Skip to content

Instantly share code, notes, and snippets.

@hideo55
Created May 30, 2011 14:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hideo55/998986 to your computer and use it in GitHub Desktop.
Save hideo55/998986 to your computer and use it in GitHub Desktop.
STDERR into scalar
use Test::More tests => 1;
use strict;
use warnings;
local *STDERR;
my $stderr;
open STDERR, '>', \$stderr or die $!;
warn 'error';
like $stderr, qr/^error/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment