in reply to Auto Feeding Data to Unix Programs
Are you trying to send text to the execopu program? If so, check out Perl's open(FH, '|...') function:
#!/usr/bin/perl open(EXECOPU, '| execopu -text') or die("Can't run execopu: $!\n"); my @site_numbers = (7, 12); print EXECOPU "cell\n"; foreach my $site_number (@site_numbers) { print EXECOPU <<"EOF"; u csno = $site_number ccuoosmin_3g1x = "" ccuoos_3g1x = "" u EOF }
You might also want to check our IPC::Open2, IPC::Open3 and IPC::Run, especially if you want to capture the output.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Auto Feeding Data to Unix Programs
by awohld (Hermit) on Apr 19, 2005 at 22:39 UTC | |
|
Re^2: Auto Feeding Data to Unix Programs
by awohld (Hermit) on Apr 19, 2005 at 23:12 UTC | |
by ikegami (Patriarch) on Apr 20, 2005 at 03:08 UTC |