On Tue, Mar 25, 2003 at 03:31:29PM -0500, [EMAIL PROTECTED] wrote:
> I'm converting a TCL script to perl.
> 
> The original script had a line that said this:
> 
> >if {[catch {exec rsh $linuxMachine "cd $pwd/test/c/$testName; \
> >     make $makeparam >&! log/make.log"} result]} {  ;# exec error
> >     error "\n >>> Can't execute make:\n >>> '$result'\n\n"
> 
> which I translated into this in perl:
> 
> > my $make_command = 
> >      "rsh $linuxMachine "
> >     ."cd $pwd/test/c/$testName;"
> >     ."make $makeparam >&! log/make.log";
> >
> > my $retval = syscmd($make_command);
> >
> > if ($retval) 
> 
> when I run the perl version, I get this:
>        sh: !: bad number
>       
>        >>> Can't execute make:
>        >>> ''
> 
> When I do the commands directly on teh command line:
>       rlogin willy
>       cd ../test/c/cftest
>       make all > & ! log/make.log
> it works fine.
> 
> 
> I don't know if the problem comes from
> me not understanding something in 
> TCL, Perl, or Unix. Does anyone see
> anything that would get this to work?

Can you show us the code for syscmd?

Walt

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to