in reply to Get filename of STDOUT
That is... look into this process (/proc/$$), examine its filehandles (/proc/$$/fd). In particular, look at its filehandle number 1 (the fileno of STDOUT). This will be a symlink to the actual file that STDOUT is opened to (hence the readlink).[me@host]$ perl -le 'my $outputfile = readlink "/proc/$$/fd/1"; print +STDERR $outputfile;' > t1 /home/me/t1 [me@host]$
------------ :Wq Not an editor command: Wq
|
|---|