in reply to Common uses of "use"
In my editor I have a macro that inserts:
#! perl -slw use strict;
And that's how I start all my new Perl scripts. Anything else gets added as and when I need it.
On the other hand, in my REPL, which is where I do the majority of my trail&error coding, I have a bunch of things including:
use threads; use threads::shared; use Data::Dump qw[ pp ]; use List::Util qw[ min max sum reduce ]; use LWP::Simple; use XML::Simple; use GD;
It also has a bunch of small subs that I use commonly: rgb2n(), n2rgb(), uniq(), rndStr() and others. But both lists tend to change as I encounter different requirements.
I also experimented with use 5.010 (for say) for a little while, but I still use a 32-bit perl5.8.9 sufficiently frequently (because more of CPAN is available via PPM for that build than my 64-bit 5.10 installation), but the inability to use scripts that contain 5.010 with that build put me off.
|
|---|