How about writing perl in a more portable way? Both of the following should work on all systems: @args = ( 'kpsewhich', '--expand-var', '$SELFAUTODIR/foo'); system(@args) == 0 or die "system @args failed: $?"; system('kpsewhich', '--expand-var', '$SELFAUTODIR/foo') == 0 or die "some useful message... $?"; Thomas