was [TriLUG] perl programming question. now more uselessinfo/commentary
Robert Wagoner
RAWagoner at mactec.com
Thu Mar 21 12:01:18 EST 2002
Andy,
Small nit - to avoid possible problems when writing into a pipeline,
you should check the return status from the close() as well as the
open(), and you also need to handle a SIGPIPE if it occurs.
--
Robert (top-posting due to brain-damaged mailer)
>>> andrew_perrin at unc.edu 3/21/02 11:14 AM >>>
There are several ways to do this; I would probably do something like
the
following:
open(SFDISK, "|/path/to/sfdisk /dev/hde") or die "Oops! $!";
print SFDISK <<EOF;
0,174,6,-
174,174,83, *
348,173,83, -
EOF
close SFDISK;
Best,
Andy (hoping he's right this time....)
More information about the TriLUG
mailing list