#!/usr/bin/perl $ENV{JAVA_HOME}='/path/here'; # set other items in %ENV as appropriate exec '/usr/bin/ksh';