http://www.perlmonks.org?node_id=579260


in reply to qx and $!

On a Mac, it prints nothing.

However, if you change this to:
perl -e 'print qx(date);'
... you'll get the date printed on the command line.

qx executes the system's date command and returns it as a quoted string. $! refers to the last error thrown by a statement that isn't in an eval block.

Why it's a 'Bad file descriptor' or 'Illegal seek' is interesting. I don't know. I suspect, however, that this is what you really wanted to know when you posed this question. (?)

At any rate... I'd like to know. I'll test it tomorrow on a Linux system, since my Mac doesn't seem to freak out on an unset $!.
Bro. Doug :wq