in reply to system and &>/dev/null
Does someone know how to create sparse files with Perl without using a system command?How about this:
open my $fh, '>', 'zeros' or die "error opening fh: ($!)"; binmode $fh; print $fh pack "x512"; #512 bytes-- season to taste, loop as needed
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: system and &>/dev/null
by duelafn (Parson) on Oct 10, 2008 at 02:21 UTC | |
by mscharrer (Hermit) on Oct 10, 2008 at 07:14 UTC | |
by repellent (Priest) on Oct 10, 2008 at 18:02 UTC | |
by Fletch (Bishop) on Oct 10, 2008 at 18:34 UTC | |
by repellent (Priest) on Oct 10, 2008 at 21:28 UTC | |
by mscharrer (Hermit) on Oct 11, 2008 at 09:30 UTC |
In Section
Seekers of Perl Wisdom