in reply to Re: Re: Re: Extract lines and output...
in thread Extract lines and output...
A few things I picked up from your code:#!/usr/bin/perl -w while(<*>) { next if /^$0$/; open I, $_ or die "$_: $!"; open O,">$_.bak" or die "$_.bak: $!"; print O $_, "\n", (<I>)[0..3]; #close I, close O; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Extract lines and output...
by tachyon (Chancellor) on Oct 10, 2001 at 11:10 UTC |