#!/usr/bin/perl #use strict; #use warnings; my $cust_file="customer.txt"; my $billing_file="2010.bill"; # '<' means read only open(CUST_DATA,'<', $cust_file) || die("Could not open file!"); #@raw_data=; #Done reading the file - close it while () { ($CUST_ID,$CUST_NAME) = split(':',$_); $CUST_NAME{$CUST_ID}=$CUST_NAME; if (length($CUST_NAME)>$maxCUST_NAMElength) { $maxCUST_NAMElength=length($CUST_NAME); } } close(CUST_DATA); # '<' means read only open(BILL_DATA,'<', $billing_file) || die("Could not open file!"); @rawbill_data=; close(BILL_DATA);