#!/bin/bash file=$1 var=$2 cat $1 | perl -e 'perlcodeinhere' >output