summaryrefslogtreecommitdiff
path: root/devel/p5-IO-Null/DESCR
blob: 5f200fbfcbadc17b0a3ce3d7e3b4d27fb35bbf80 (plain)
1
2
3
4
5
6
7
8
9
10
This is a class for null file handles. Calling a constructor of this
class always succeeds, returning a new null file handle. Writing to
any object of this class is always a no-operation, and returns true.
Reading from any object of this class is always no-operation, and
returns empty-string or empty-list, as appropriate.

You could say:
       open(NULL, '>/dev/null') || die "WHAAT?! $!";
and get a null FH that way.  But not everyone is using an OS
that has a /dev/null