Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: I need to export variable as another user

by aitap (Deacon)
on Aug 06, 2012 at 12:39 UTC ( #985694=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if (fork == 0) {
     # create a subprocess
    ...
     exec("/path/to/program","some","program","arguments");
     # run the program
    }
    
  2. or download this
    open my $shell, "|/bin/sh" || die "$!\n";
    print $shell "export var=value\n";
    ...
    print $shell "some complicated shell command # ;(){:|:&};:\n";
    print $shell "/run/the/program --with-args\n";
    
  3. or download this
    system <<"END";
    export var=value
    ...
    some() {shell commands}
    /run/some/program
    END
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://985694]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-09-18 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (109 votes), past polls