Help for this page

Select Code to Download


  1. or download this
    my $output = `PATH=$ENV{PATH} command arg1 arg2 argn`;
    
  2. or download this
    my $output = `setenv PATH "$ENV{PATH}"; command arg1 arg2 argn`;
    
  3. or download this
    my ($cp) = grep { -x $_ } map { "$_/cp" } grep { length $_ } split /:/
    +, $ENV{PATH};
    die "cant find cp" unless defined $cp;
    my $output = `$cp source dest`;