was [TriLUG] perl programming question. now more uselessinfo/commentary

Andrew Perrin andrew_perrin at unc.edu
Thu Mar 21 12:07:02 EST 2002


Fair 'nuff, although the shell-script version doesn't handle either.

ap

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
 Assistant Professor of Sociology, U of North Carolina, Chapel Hill
      269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA


On Thu, 21 Mar 2002, Robert Wagoner wrote:

> 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....)
> 
> _______________________________________________
> TriLUG mailing list
>     http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ:
>     http://www.trilug.org/~lovelace/faq/TriLUG-faq.html
> 




More information about the TriLUG mailing list