In the future, I think it would be better if you place the script in an
accessible location (WWW) or attached it.  Normally, attachments are bad, but a
long script with very long lines is worse as a body. 

On Wed, Oct 09, 2002 at 08:01:39AM -0400, Jennifer Fountain wrote:
> I am hoping someone could help me debug a script - I inherited this script:

I'll try and hit the problem points:

> 
> $MFG_FILE = "manufacturing_order_data_add";
> $ERR_FILE = "manufacturing_order_data_ign";
>

OK, here, these two scalars are populated with filenames as strings.

> open(O1,"> $MFG_FILE") || die "could not open MFG file $!\n";
> open(E1,"> $ERR_FILE") || die "could not open ERR file $!\n";

Now, filehandles O1 and E1 are opened as those handles for writing.  (What
awful filehandle names!)

> #  print O1
> "MFG-".$key,"\t",$rtng{$key},"\t",$part{$key},"\t",$out_qty{$key},"\t","1","
> \n"; if ($out_qty{$key} ne "0"){    print O1
> "Z".$ordnbr,"\t",$rtng{$key},"\t",$part{$key},"\t",$out_qty{$key},"\t","0","
> \t","1","\t","1","\n";    $printed{$key}=1; #  }    }

This is the next mention of O1.  Notice that it's commented out.  I'm not
entirely clear on how much of this was commented and how much is not.

> #  print E1 "Total qty for (prt.rtg) = ",$key," , equal to ",$total{$key},"
> not within lot size limits\n";
>    print E1
> "Z".$ordnbr,"\t",$rtng{$key},"\t",$part{$key},"\t",$total{$key},"\t",$min{$k
> ey},"\n";  }

Same thing, here. 

I'd like to see this file in a pristine state, unmunged by MUAs.  Could you
make it available?
 
> and for some reason - these files - $MFG_FILE =
> "manufacturing_order_data_add"; and $ERR_FILE =
> "manufacturing_order_data_ign"; aren't getting populated with data.  the
> developer thinks this script is the reason but my eyes have looked at this
> too many times to find any errors.

Have you considered whether those files might have been obsoleted by the
command line parameters the script accepts?  I haven't really given it a
thorough look to figure out what it does or what they're for.

-- 
rjbs

Attachment: msg09421/pgp00000.pgp
Description: PGP signature

Reply via email to