Help for this page

Select Code to Download


  1. or download this
        while (<DATAFILEIN>) {
            chomp;
            my %record;
            @record{ @fields } = split /\|/;
    
  2. or download this
            push @records, \%record;
        }
    
  3. or download this
        my @fields = qw(
            time
    ...
            citystatezip
            fax
    );
    
  4. or download this
      for ( sort { $a->{'company_name'} cmp $b->{'company_name'} } @record
    +s ) {
            print "$_->{'company_name'} and other fields here.\n"
        }
    
  5. or download this
        while (<DATAFILEIN>) {
            chomp;
            my %record;
    ...
            my %rec = %{ $records{$_} };
            print "$rec{'company_name'} and other fields here.\n"
        }