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


in reply to What's the best way to handle the installation and or distribution of a Perl script?

The $^O variable ($OSNAME if you "use English;") contains an indication of the name of the operating system (not its release number) that the perl binary was built for.

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

Replies are listed 'Best First'.
Re^2: What's the best way to handle the installation and or distribution of a Perl script?
by Utilitarian (Vicar) on Nov 24, 2013 at 22:35 UTC
    I would caution that there is always the possibility that a future release of your utility may require its own modules and so a standard release may be advisible but for simple releases dropping a script which requires a minimum Perl version in a directory on the standard path should suffice.
    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."