Welcome to the Monastery | |
PerlMonks |
Re^4: Convert Shell script to Perlby Utilitarian (Vicar) |
on Oct 10, 2011 at 15:43 UTC ( [id://930671]=note: print w/replies, xml ) | Need Help?? |
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."
In Section
Seekers of Perl Wisdom
|
|