http://qs1969.pair.com?node_id=678943


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
    .......