S:\Steve\Dev\PerlMonks\P-2017-06-08@1920-ssh-grep>perl grep1.pl $dir = [/home] $file = [test.dat] $regexpaaa = [-i -e '^AAA='] @command2: [0] = [ssh us@ip -o BatchMode=yes grep -i -e '^AAA=' /home/test.dat] S:\Steve\Dev\PerlMonks\P-2017-06-08@1920-ssh-grep>