Hello everyone. I am having an issue with the following code snippet. It works fine if I comment out the ordern file part... I am wondering if there is an issue having two files open?
Thanks!
Thanks!
Code:
if (uc($INPUT{step}) eq uc("two"))
{
#Get Order Num - This section is where the error is
open (ORDERN, "+<OrderNum.dat") or die $!;
$INPUT{order_num} = <ORDERN>;
$new = $INPUT{order_num}+1;
print ORDERN $new;
close(ORDERN);
#Submit Order
open(FILEH, ">>Order.dat") or &dienice("Can't open Order.dat for writing: $!");
while ( my ($key, $value) = each(%INPUT) )
{
print FILEH "$key:$value,";
}
print FILEH "\n";
close(FILEH);
print "Done!";
}