Skip to content

Instantly share code, notes, and snippets.

Created August 12, 2010 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/521392 to your computer and use it in GitHub Desktop.
Save anonymous/521392 to your computer and use it in GitHub Desktop.
pmichaud@orange:~/rakudo$ cat abc
say 'STDOUT: foo 0';
warn 'STDERR: foo 1';
{
my $*OUT = $*ERR;
say 'STDERR: foo 2';
}
say 'STDOUT: foo 3';
pmichaud@orange:~/rakudo$ ./perl6 abc
STDOUT: foo 0
STDERR: foo 1 at line 2:abc
STDERR: foo 2
STDOUT: foo 3
pmichaud@orange:~/rakudo$ ./perl6 abc >/dev/null
STDERR: foo 1 at line 2:abc
STDERR: foo 2
pmichaud@orange:~/rakudo$ ./perl6 abc 2>/dev/null
STDOUT: foo 0
STDOUT: foo 3
pmichaud@orange:~/rakudo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment