my($cust_main,%saw);
foreach $cust_main (
map {
+ unless ( exists $saw{ $_->custnum } && defined $saw{ $_->custnum} ) {
+ $saw{ $_->custnum } = 0; # to avoid 'use of uninitialized value' errors
+ }
if (
( $main::opt_a || ( ( $_->getfield('bill') || 0 ) <= $time ) )
&& $bill_only{ $_->custnum }
# and bill them
print "Billing customer #" . $cust_main->getfield('custnum') . "\n";
- next;
my($error);
sub untaint_argv {
foreach $_ ( $[ .. $#ARGV ) { #untaint @ARGV
- $ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+ #$ARGV[$_] =~ /^([\w\-\/]*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
+ # Date::Parse
+ $ARGV[$_] =~ /^(.*)$/ || die "Illegal arguement \"$ARGV[$_]\"";
$ARGV[$_]=$1;
}
}
=head1 VERSION
-$Id: freeside-bill,v 1.1 1999-08-11 20:41:27 ivan Exp $
+$Id: freeside-bill,v 1.4 2000-04-03 02:32:57 ivan Exp $
=head1 BUGS