Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Call Python script and pass arguments from Perl script

by aitap (Curate)
on May 15, 2013 at 11:02 UTC ( [id://1033664]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $output=qq{sudo /usr/bin/python /home/processLog.py \Q$name\E \Q$ag
    +e\E \Q$text\E \Q$id\E};
    return `$output`;
    
  2. or download this
    open my $fh, "-|", qw{sudo /usr/bin/python /home/processLog.py}, $name
    +, $age, $text, $id or die $!;
    return do {local $/; <$fh>};
    
  3. or download this
    use IPC::Run;
    run [qw{sudo /usr/bin/python /home/processLog.py}, $name, $age, $text,
    + $id], ">", \(my $return) or die "run: $?";
    return $return;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-19 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found