On Sun, 2006-23-04 at 13:29 -0400, Smith, Derek wrote:
> use strict;
> 
> use warnings;
> 
>  
> 
> my $file = qq(/usr/local/admin/perl/derek_perl/test);
> 
> open (FH, "+< $file");
> 
>        while ( <FH> ) {
> 
>           if (/\Acheck\-names/) {
> 
>               my $addr=tell(FH);

if( $addr < 0 ){ die "tell(FH) failed: $!\n"; }

> 
>               #print $addr,"\n";
> 
>               #print $_;
> 
>               truncate (FH, $addr);

truncate( FH, $addr ) or die "cannot truncate FH: $!\n";

> 
>  
> 
>           }
> 
>        }


-- 
__END__

Just my 0.00000002 million dollars worth,
   --- Shawn

"For the things we have to learn before we can do them, we learn by doing them."
  Aristotle

* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to