On 18 Sep 2002 at 20:43, Daniel Hurtado Brenner wrote:
> OK. BUT HOW I CAN DO FOR THIS RESULTS BE:
> 4|name four|address four|
> 3|name three|address three|
> 2|name two|address two|
> 1|name|address|

To use Fliptop's suggestion, you'll probably need to read your file into 
an array before doing the sort such as follows (WARNING: untested code):

my @lines;
while(<IN>){
        push @lines, $_;
}
reverse @lines;
while (@lines) {
  @file=split(/\|/,$_);
        If ($file[0] ne ""){
        print "$field[0] | $field[1] | $field[2]";
        }
}

HTH,
William

-- 
 Lead Developer
 Knowmad Services Inc. || Internet Applications & Database Integration
 http://www.knowmad.com
 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • sort Daniel Hurtado Brenner

Reply via email to