#!/usr/bin/perl -w use strict; BEGIN { print "This is at the start\n"; } die; print "This is in the middle.\n"; exit; print "This should never print.\n"; END { print "This is in the end.\n"; }