in reply to Re: how can i send data to /dev/null ?
in thread how can i send data to /dev/null ?

If for some reason, someone wants to write to /dev/null and wants portability, it's good to use File::Spec

open( my $null, ">", File::Spec->devnull ) or die "Couldn't open null device";

I could see this potentially being useful if testing some code that takes a filehandle, but where one doesn't actually want to be writing anything to disk.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.