- or download this
#!/usr/bin/perl -w
use strict;
...
print OUT_FILE "$dept,$deptTotals{ $dept }\n";
}
close OUT_FILE;
- or download this
#!/usr/bin/perl -w
use strict;
...
}
close OUT_FILE;
}
- or download this
my $expenses = get_expense_data( EXPENSE_FILE );
my $deptTotals = sum_expenses_by_department( $expenses, FIELDS_PER
+_RECORD );
write_report( $deptTotals, EXPENSE_REPORT, REPORT_HEADER );
- or download this
use constant EXPENSE_FILE => 'expense.dat';
use constant EXPENSE_REPORT => 'final_expense.txt';
...
my $deptTotals = sum_expenses_by_department($expenses, FIELDS_PER_
+RECORD);
write_report( $deptTotals, EXPENSE_REPORT, REPORT_HEADER );
write_report( $large_expenses, ERROR_REPORT, ERROR_HEADER );