Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
run perl script and capture the output
Li Chen
12/20/2006 4:25:00 AM
Hi all,
I need to run a perl script from Ruby and capture its output. I use the
following line in Ruby but it fails. Any input will be appreciated.
out=`perl c:\\Perl\\self\\back1\.pl`
Li
--
Posted via
http://www.ruby-...
.
1 Answer
Paul Lutus
12/20/2006 5:36:00 AM
0
Li Chen wrote:
> Hi all,
>
> I need to run a perl script from Ruby and capture its output. I use the
> following line in Ruby but it fails.
Define "fails". What happened?
> Any input will be appreciated.
>
> out=`perl c:\\Perl\\self\\back1\.pl`
Is this really the line you used? How about this instead:
out=`perl c:\\Perl\\self\\back1.pl`
Or, because I have no way to test your Windows syntax:
out=`perl c:/Perl/self/back1.pl`
Also, if Perl has been installed correctly and the Perl script is written
reasonably well, you shouldn't need the "perl" command in the line.
If these alternatives fail, you will have to run some tests, and work up to
the script.
Tests like this:
out = `perl -v`
See what this puts in the "out" variable.
--
Paul Lutus
http://www.ara...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
run perl script and capture the output
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password