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


in reply to Re: How do I tell if a handle is open for writing?
in thread How do I tell if a handle is open for writing?

That isn't what he is asking for...

$ touch x; perl -le 'open X,"x"; print -w X; print X "x" or die $!' 1 Bad file descriptor at -e line 1.

-sauoq
"My two cents aren't worth a dime.";