{ local $ENV{ LD_LIBRARY_PATH } = q{/path/to/libs}; my $cmd = "..."; system( $cmd ) == 1 or die "Problem with '$cmd': $?\n"; }