Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Convert Shell script to Perl

by akrrs7 (Acolyte)
on Oct 10, 2011 at 15:46 UTC ( #930674=note: print w/replies, xml ) Need Help??


in reply to Re: Convert Shell script to Perl
in thread Convert Shell script to Perl

I've tried the following code:
use strict; use warnings; $ENV {'LIBDIR'}='C:/eWorkspace/myPerlProgram'; $ENV {'LOCALCLASSPATH'}='$ENV{LIBDIR}:/xalan.jar'; $ENV {'LOCALCLASSPATH'}='$ENV{LOCALCLASSPATH}:$ENV{LIBDIR}/xml-apis.ja +r'; $ENV {'LOCALCLASSPATH'}='$ENV{LOCALCLASSPATH}:$ENV{LIBDIR}/xercesImpl. +jar'; system "$ENV{LIBDIR}/xalan_perl.pl"
I've then run this program from the command line to get the following message: Can't spawn "cmd.exe": No such file or directory at C:\eWorkspace\myPerlProgram\ xalan_perl.pl line 33.

Replies are listed 'Best First'.
Re^3: Convert Shell script to Perl
by FreeBeerReekingMonk (Hermit) on Mar 01, 2016 at 20:10 UTC
    Sorry for necroposting, but in Perl, the running code should be:

    my $JAVACMD = "$JAVA_HOME/bin/java"; my @OUTPUT = `$JAVACMD -cp "$LOCALCLASSPATH" org.apache.xalan.xslt.Pro +cess "@ARGV"`;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://930674]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-10-01 19:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (7 votes). Check out past polls.