uh…remind me how to begin a perl script?

Don’t let me forget to do this at the start of my perl scripts at work:

package main;
use strict;
use warnings;
use Carp;
$SIG{ __DIE__ } = sub { Carp::confess( @_ ) };
use Scalar::Util; #::looks_like_number;
# Un-buffer output
$| = 1;
# this is pedantic necessity for the following use statements
use lib '/home/lanforge/scripts';
use LANforge::Endpoint;
use LANforge::Port;
use LANforge::Utils;
use Net::Telnet ();
use Getopt::Long;
use Socket;
use POSIX;
Advertisements