for (reverse 0..$#ARGV) { splice(@ARGV, $_, 1) if $ARGV[$_] eq '--config'; }