Jess Balint wrote:
>
> Hi all. Can anybody tell me why I get a broken pipe on the following? I just
> can figure it out. Thanks.
>
> jess
>
> # Get all possible states from the files
> open( STATES, "sort $hotline |" )
> or cust_die( "Cannot open files to get states
> ($hotline,$newtofile,$newmover): $!\n" );
What does the $hotline variable contain? Is there any reason to use an
external sort instead of perl's built-in sort?
> while( <STATES> ) {
> # Recode missing
> # if( m/^$/ ) { $_ = "(blank)"; }
> push @states, $_;
push @states, ($_ || '(blank)');
> }
> close( STATES );
When you close a pipe you should verify that it closed.
close STATES or cust_die( "Cannot close pipe from '$hotline' $!" );
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]