in reply to formatting question

I haven't tested whether this matches your logic, but it should be close, anyway:

sub body { ... your code ...} SWITCH: { body, last SWITCH if $wrongDateFlag and $#ARGV >= 2; body, last SWITCH if not $wrongDateFlag and $#ARGV >=2 and $oneDay +Flag == -1 ; body, last SWITCH if not $wrongDateFlag and $#ARGV >=1 and $oneDay +Flag >= 0; $felloff == 1; }

UPDATE:

I forgot $#ARGV returns one less than scalar @ARGV so I fixed that. Some would probably fault me for using a switch statement where each path calls the same code but I like the resulting look. Cleaner might be.

sub body { ... your code ...} body if $wrongDateFlag and $#ARGV >= 2 or not $wrongDateFlag and $#ARGV >=2 or not $wrongDateFlag and $#ARGV >=1 and $oneDayFlag >= 0;

UPDATE:

removed some vestigial semicolons.


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}