use Storable; bless our $x = [], 'My::class'; print Storable::freeze($x); # No error, $x is global. bless my $y = \*STDERR, 'My::class'; print Storable::freeze($y); # Can't store GLOB items, $y is lexical.