in reply to an ever-available file for opening
If you want something that never runs out, or can't be overfilled.
#!/usr/bin/perl use warnings; use strict; $|++; open(RH, "/dev/urandom") or die "$!\n"; #always some to read #while (<RH>){print "$_\n";} open(ZH, "> /dev/zero") or die "$!\n"; #can always write to it while (<RH>){ print "chunk"; print ZH "$_\n"; }
|
|---|