Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
my $last_maxsize = 170000; #I need to delete original files here... open my $last_in, '<', "$path_only/$file_name" or die $!; { local $/ = \$last_maxsize; while ( my $new_record = <$last_in> ) { next if -s $new_record > $last_maxsize; open my $last_out, '>', "$path_only/$file_name" or die $ +!; #It should create the file(s) with a new size print $last_out $new_record; close $last_out or die $!; } close $last_in; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Delete On File Size
by Fletch (Bishop) on Feb 17, 2006 at 15:55 UTC | |
|
Re: Delete On File Size
by mikeock (Hermit) on Feb 17, 2006 at 15:50 UTC | |
by Anonymous Monk on Feb 17, 2006 at 15:56 UTC | |
by mikeock (Hermit) on Feb 17, 2006 at 16:20 UTC | |
|
Re: Delete On File Size
by wulvrine (Friar) on Feb 17, 2006 at 17:20 UTC | |
|
Re: Delete On File Size
by graff (Chancellor) on Feb 18, 2006 at 16:09 UTC |