CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Call external program with parameters


New User

May 5, 2002, 4:47 AM

Post #1 of 2 (1246 views)
Call external program with parameters Can't Post

Smile Hi there!

I'm struggeling with a very nasty problem. Lets start:

i want to start the following external program out of a perlscript which just processed a file and is passing on the data to a program. It looks like this:

ext_command -f scriptfile "procname("""var1""","""var2"""....."""var3""")"

The perl i used for this was"

system (ext_command ,-f scriptfile "procname("""$var1""","""$var2"""....."""$var3""")")

However this is mot working out, i never parsed vars with multiple """ in the commandline

Any input is more then welcome!

John Unsure

User / Moderator

May 6, 2002, 7:00 AM

Post #2 of 2 (1240 views)
Re: [johnK] Call external program with parameters [In reply to] Can't Post


Try either of these two ways:

 system (ext_command ,-f scriptfile qq~procname("$var1","$var2"....."$var3")~) ; 

or ...

system (ext_command ,-f scriptfile "procname(\"$var1\",\"$var2\".....\"$var3\")") ;

I am not sure if they will yeild success, but they get you away from ending the
quote prematurely.


print unpack"u*",pack "h*",$a,"\n\n";


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives