Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^4: Convert Shell script to Perl

by Utilitarian (Vicar)
on Oct 10, 2011 at 15:43 UTC ( #930671=note: print w/ replies, xml ) Need Help??

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

Two things, you need to tell the Perl interpreter to execute the code rather than look for a file of that name and the environment variables will not be set int the parent process (your shell) only in the Perl process and its children.

So while perl -e "$ENV{LIBDIR'}='C:\SOMEFOLDER';" would create the varable, it would cease to exist when Perl exited.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."

Comment on Re^4: Convert Shell script to Perl
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2015-11-25 15:36 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (681 votes), past polls