Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to delete the last record which will have different numbers but in this case is 9987. This is where i am with script on Windows.3098 4908 3098 54098 34098 2308 9987
my $stuff = 'file.txt'; open(F, "$stuff") || die "Can not open file: $!\n"; my @records = (<F>); print "@records\n"; s/lastlineofdata//; #This is the part I am struggling with close(F);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Delete last record in text file
by jmcnamara (Monsignor) on Aug 18, 2003 at 17:14 UTC | |
|
Re: Delete last record in text file
by CukiMnstr (Deacon) on Aug 18, 2003 at 17:32 UTC | |
by wirrwarr (Monk) on Aug 18, 2003 at 18:14 UTC | |
|
Re: Delete last record in text file
by dragonchild (Archbishop) on Aug 18, 2003 at 17:16 UTC | |
|
Re: Delete last record in text file
by blue_cowdawg (Monsignor) on Aug 18, 2003 at 17:16 UTC |