Take a look at the quotes in the original tcl.
you're calling "rsh <machinename>" with the next argument all as one thing,
in quotes
that doesn't seem to have translated properly to your perl implementation
As richard Morse pointed out in a more recent message, you may want to check
how it would work on a command line with the rsh, but I'd bet that that's
your problem.  it's trying to interpret the > & ! locally, which probably is
some other shell or goodness only knows what.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 25, 2003 3:31 PM
> To: mongers of perl
> Subject: [Boston.pm] tcl-perl-unix problem
> 
> 
> 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?
> 
> 
> 
> -- 
> Greg London                    "Do What I Mean" and
> http://www.GregLondon.com       Autovivification
>                                 sometimes unwanted
> _______________________________________________
> Boston-pm mailing list
> [EMAIL PROTECTED]
> http://mail.pm.org/mailman/listinfo/boston-pm
> 
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to