@echo off echo Hello from the DOS/Windows command interpreter perl -x -S %0 goto batchend #!perl use strict; use warnings; print "Hello from Perl\n"; exit; __END__ :batchend echo Back from perl in the command interpreter