I just have no idea where to go from here.... I know I need the following line at some point, but don't know where...#!/usr/bin/perl -w use strict; use Lingua::EN::NameCase qw( nc ); #Where the files are located... my $Location = 'z:/bpermits/data2007/test/marchpermits.txt';<br> my $OutFile = 'z:/bpermits/data2007/test/output.txt'; #Open the files...... open(PERMSIN, $Location) or die "unable to open $Location: $!"; open(OUT, ">$OutFile") or die "unable to open $OutFile: $!"; #Read in the file, using a loop........ my @columns = qw( Permit_Number Street_Number Street_Prefix Street_Nam +e Street_Suffix Lot Block Issue_Date Proposed_Use_Code Permission_To_Code Square +_Feet Estimated_Cost Units Subdivision Zoning Contractor_Name Contractor_Add1 Contractor_Add2 Contractor_C +ity Contractor_State Contractor_Zip Contractor_Phone1 Contractor_Phone2 Owner_Name Owner_Add1 Owner_Add2 Owner_City Owner_State Owne +r_Zip Owner_Phone ); while( my $line = <PERMSIN> ) { chomp( $line ); # populate the hash %thisrecord with the column names and the valu +es from this line my @fields = split( /,/, $line ); my %thisrecord = map { $columns[$_] => $fields[$_] } ( 0 .. $#fiel +ds ); my @data = (); push @data, \%thisrecord; }
sort { $b->{ Estimated_Cost } <=> $a->{ Estimated_Cost } } @data;
In reply to Help with sort.... by skins96
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |