Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Running a shell script from Perl, and making that shell script accept input from perl script. Fork?

by Corion (Patriarch)
on Apr 08, 2008 at 07:50 UTC ( [id://678943]=note: print w/replies, xml ) Need Help??


in reply to Running a shell script from Perl, and making that shell script accept input from perl script.

In the most general case, you want some IPC. In your specific case, the pipe-open is likely the easiest way to submit jobs, as you're not interested in the output of your job launcher:

my $queue = './Job.sh'; open my $submit, '|-', $queue or die "Couldn't launch queue submission '$queue': $!/$?"; ... for my $job (@jobs) { print {$submit} "$job\n"; };
  • Comment on Re: Running a shell script from Perl, and making that shell script accept input from perl script. Fork?
  • Download Code

Replies are listed 'Best First'.
Re^2: Running a shell script from Perl, and making that shell script accept input from perl script. Fork?
by why_bird (Pilgrim) on Apr 08, 2008 at 08:28 UTC
    Thanks---I didn't realise that's what pipes were for. It's working very well now.
    Cheers
    why_bird
    ........
    Those are my principles. If you don't like them I have others.
    -- Groucho Marx
    .......

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found