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

Reply via email to