Willman023 has asked for the wisdom of the Perl Monks concerning the following question:
# $last_current_schedule is the last line of schedule.txt open (CURRENTSCHEDULE, "calendars/$calendar/schedule.txt"); my $last_current_schedule; local $_; $last_current_schedule = $_ while <CURRENTSCHEDULE>; @last_current_schedule = split(/\t/, $last_current_schedule); close CURRENTSCHEDULE; if($last_current_schedule[1] != $second_last_current_schedule[ +1]) { $last_current_schedule[0] = $new_default_id; } else { # test second, third to last until equal. $bw = File::ReadBackwards->new( 'logfile.txt' ) or die "can't read 'log_file' $!" ; while( defined( $log_line = $bw->readline ) ) { print LOGFILE $log_line ; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: End of File Woes
by Tanalis (Curate) on Oct 25, 2002 at 20:00 UTC |