- or download this
sub main::BEGIN { print "X\n" }
- or download this
*main::BEGIN = sub { print "X\n" };
&BEGIN;
- or download this
*main::BEGIN = sub { print "X\n" };
BEGIN();
- or download this
*main::BEGIN = sub () { print "X\n" };
BEGIN();
- or download this
perl -e 'BEGIN' # Syntax error.
perl -e 'BEGIN; # No error.
perl -e 'BEGIN()' # Syntax error.
perl -e 'BEGIN();' # No error.