Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Convert Shell script to Perl

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


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

I guess..I know that $ENV is similar to a hashmap and has a key and a value...

$ENV {'LIBDIR'}='$MY_XALANHOME/bin';
seems to be the correct way to set that. Please confirm. What I am not sure is - should I also set the JAVACMD as an environment variable using $ENV ? Thanks...


Comment on Re^2: Convert Shell script to Perl
Download Code
Re^3: Convert Shell script to Perl
by Anonymous Monk on Oct 10, 2011 at 14:20 UTC
      This is my current code:
      use strict; use warnings; $ENV {'LIBDIR'}='$MY_XALANHOME/bin'; $ENV {'LOCALCLASSPATH'}='$ENV{LIBDIR}:/xalan.jar'; $ENV {'LOCALCLASSPATH'}='$ENV{LOCALCLASSPATH}:$ENV{LIBDIR}/xml-apis.ja +r'; $ENV {'LOCALCLASSPATH'}='$ENV{LOCALCLASSPATH}:$ENV{LIBDIR}/xercesImpl. +jar';
      I've commented out the JAVACMD lines. When I run this on the cmd line say - perl a.pl this does not give me any errors. But I should be able to find these env variables in the command window - I cannot. I've also simply tried this on the command line
      perl $ENV{'LIBDIR'}='C:\somefolder';
      I get a message saying - 'Can't open perl script "$ENV":no such file or directory

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-12-25 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls