use Inline AWK; # ^ # | # Space. awk(); # operates on @ARGV by default __END__ __AWK__ ...