in reply to Unix batch from perl?
each backticked line runs in sequence. Try this:#!/usr/bin/perl `intranet/develop/Susp/mifuture.cgi idnumber=218`; `at now + 2 minute <<EOF`; `/....../mifuture.cgi idnumber=220`; `EOF` ; $atq = `atq`; print qq( ATQ: $atq);
(NOTE: Untested but close, and right in principle.)
or something like it. And read up on backticks and system().#!/usr/bin/perl `intranet/develop/Susp/mifuture.cgi idnumber=218`; `at now + 2 minute <<EOF /....../mifuture.cgi idnumber=220 EOF` ; $atq = `atq`; print qq( ATQ: $atq);
UPDATE: My solution will work (I think), and you can learn from studying it, but in all honesty, I think this answer from Fastolfe is better--I'd somehow overlooked piping.
|
|---|