How to see stderr output in linux
linux, perl
Solution
It is printed to wherever standard error is set to for your environment.
If you are running it from a console, then it will be mixed in with the standard output and displayed on the console (it won't be redirected if you redirect STDOUT, you have to redirect it separately).
If you are running it from CGI under Apache, then it will be dropped into your error.log file (wherever Apache is configured to save that).
If you are running it from somewhere else… well an exhaustive list is out of scope for Stackoverflow so you should try asking a more specific question ;)
Example of where it might be directed to at the console:
david@raston err $ cat err.pl
#!/usr/bin/env perl
use strict;
use warnings;
use v5.16;
say "out";
say STDERR "error";
~/tmp/err :
david@raston err $ ./err.pl
out
error
~/tmp/err :
david@raston err $ ./err.pl > stdout
error
~/tmp/err :
david@raston err $ ./err.pl 2> stderr
out
Problem
In a script in perl I have the following: ``` print STDERR "Access error" ``` I would like know where this message is printed, but I don't know how can I see the Standar error output in LInux.