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


in reply to arguments to perl -e

#!/bin/bash file=$1 var=$2 cat $file | perl -e 'BEGIN { $var = $ARGV[0] } print <STDIN>' $var > o +utput