#!/usr/bin/perl STRICT: { use strict; my $strict; BEGIN { $strict = $^H } strict_bits($strict); } NO_STRICT: { no strict; my $strict; BEGIN { $strict = $^H } strict_bits($strict); } sub strict_bits { my $h = shift; # from strict.pm my %bitmask = ( refs => 0x00000002, subs => 0x00000200, vars => 0x00000400 ); printf "\$^H = $h = %b\n", $h; print "strict '$_' is ", (($h & $bitmask{$_}) ? 'on' : 'off' ), "\n" for sort keys %bitmask; } __END__ $^H = 1794 = 11100000010 strict 'refs' is on strict 'subs' is on strict 'vars' is on $^H = 256 = 100000000 strict 'refs' is off strict 'subs' is off strict 'vars' is off