BEGIN { if(time % 2) { eval 'sub foo(){}' } else { eval 'sub foo($){}' } } foo /1; # is this a comment or not? /;