On 06/16/2011 05:33 AM, Tsantilas Christos wrote:
> if (! ($File = shift @ARGV) ) {
> printf STDERR "Usage: \n ".$0." error-detail-file\n\n";
> exit -1;
> }
>
Not a big deal, but the above is usually written as:
$File = shift @ARGV or
die("Usage:\n$0 error-detail-file\n");
> if (!open(IN, "<$File")) {
> printf STDERR "Can not open file %s\n", $File;
> exit -1;
> }
Similarly, the above is usually written as:
open(IN, "<$File") or
die("Cannot open error-detail-file '$File': $!\n");
> my @PO_RECORDS;
You may want to initialize this array:
my @PO_RECORDS = ();
> foreach(@PO_RECORDS) {
> my $poRec = $_;
This is usually written as
foreach my $poRec (@PO_RECORDS) {
> foreach (@lines) {
> my($l) = $_;
This is usually written as
foreach my $l (@lines) {
> $lineNumber=$lineNumber+1;
This is usually written as
++$lineNumber;
I am writing from memory so please test if you make these changes.
HTH,
Alex.
Received on Thu Jun 16 2011 - 15:10:16 MDT
This archive was generated by hypermail 2.2.0 : Fri Jun 17 2011 - 12:00:04 MDT