Make sense?my @houses; # populate @houses, an AOH (see perldsc) foreach my $file(@array) { open HOUSE "<$file"; my $hr={input_file => $file}; # do whatever parsing you need to fill in the fields # this assumes that price, location, etc... are all one # line each in file $hr->{price} = <HOUSE>; chomp $hr->{price}; $hr->{location} = <HOUSE>; chomp $hr->{location}; #... close(HOUSE); push @houses, $hr; } # sort @houses=sort {$a->{price} <=> $b->{price}} @houses; #generate HTML
In reply to Re: help sorting
by RMGir
in thread help sorting
by emilford
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |