Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: 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 reply to Re^4: Convert Shell script to Perl
by Utilitarian
|
|