CONDITION and ACTION; #### # maybe replace @ARGV below with my(@A)=@ARGV or similar, as we destroy the array while($_=$ARGV[0]){ /^(-V|-?-verbose)$/o and do{shift; $verbose=1; ...; next}; /^(-v|-?-negate)$/o and do{shift; $negate=1; ...; next}; ... /^--?$/o and do{shift; ...; last}; # early loop exit last; }