learningperl01 has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use File::Find; use Tie::File; my $DIRECTORY = $ARGV[0]; find(\&edits, $DIRECTORY); sub edits() { if ( -f and /^33dc01\..*outer.log$/ ) { foreach ( $File::Find::name ) { print "$File::Find::name\n"; tie my @file, 'Tie::File', $File::Find::name or die "Can't + tie $File::Find::name $!"; splice @file, 0, 4; untie @file; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Removing lines from files
by markkawika (Monk) on May 09, 2008 at 22:33 UTC | |
by Anonymous Monk on May 13, 2008 at 15:49 UTC | |
|
Re: Removing lines from files
by GrandFather (Saint) on May 09, 2008 at 22:13 UTC | |
|
Re: Removing lines from files
by pc88mxer (Vicar) on May 09, 2008 at 19:19 UTC | |
by Cristoforo (Curate) on May 09, 2008 at 20:09 UTC | |
|
Re: Removing lines from files
by NetWallah (Canon) on May 09, 2008 at 19:27 UTC | |
by pc88mxer (Vicar) on May 09, 2008 at 19:39 UTC | |
|
Re: Removing lines from files
by jwkrahn (Abbot) on May 09, 2008 at 21:50 UTC | |
by learningperl01 (Beadle) on May 13, 2008 at 14:25 UTC | |
by jwkrahn (Abbot) on May 13, 2008 at 21:52 UTC |