in reply to passing parms to other software program

Yeah, you can pass parameters to system or exec. There are some fine points about parameters on windows and dos(which I don't use), but try your stuff and report what errors you get.
#!/usr/bin/perl use strict; use warnings; my $param1 = 'whatever'; my $param2 = 'whoever'; my $programtorun = 'program_name'; my @parameters = ( $param1, $param2 ); my @cmdline = ( $programtorun, @parameters ); system (@cmdline); # will run cmd, and then return to script #exec (@cmdline); # will replace currently running script

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: passing parms to other software program
by brd (Acolyte) on Apr 21, 2006 at 00:31 UTC
      in most cases it is better to generate a temporary file with File::Temp, write the output in that file (e.g. system($cmd . " > $tmp_fn") ) and then parse the output file. this allows memory efficent parsers.
Re^2: passing parms to other software program
by yburge (Acolyte) on Apr 20, 2006 at 22:15 UTC
    Thanks, zentara. I'll give that a shot.