http://qs321.pair.com?node_id=930671


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."