Larry Sandwick wrote: > I have tried to read a file in backwards in stead of from the top > without any success !!! > > The original code looks like this . > > open(DATABASE, "<requests.log") || die "Cannot open ProdView Log for > read!\n"; > > I have tried the following. > > I do not get any errors from Perl, it just ignores the command. > > > > open( reverse(DATABASE), "<requests.log") || die "Cannot open ProdView > Log for read!\n"; > > reverse(open(DATABASE, "<requests.log")) || die "Cannot open ProdView > Log for read!\n"; > > Any suggestion would be helpful. > > TIA > Larry Sandwick > There might a a CPAN module which does this, but to work with it within your program, you can (depending on the size of the file), place in an array and then display it out backwards like:
my @MyData = <DATA>; # for you place in the file you opened foreach ( reverse @MyData ) { # reverses the data as found with in the array printf "%-s", $_; } Again, it will require it to be all within memory, so if a huge file, then probably will will not work, but can give it a try. Wags ;) ********************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **************************************************************** -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]