http://www.perlmonks.org?node_id=594862


in reply to Comandline arguements when perl code is getting executed from command line

This should work:
perl -slne '/TABLE/ && print "$ARGV:$_:$type"' -- -type=$type $file_na +me
See the -s swith in the perlrun manpage.