Can't use string ("") as a subroutine ref while "strict refs" in use at temp line 21. #### #!/usr/bin/perl -w use strict; # To test this uncomment these lines and (un)comment BEGIN {} #my @strings = get_init_strings(); #print "strings: @strings\n"; BEGIN { { # begin closure my @strings; my $get_strings = sub { # Trivialized code here for brevity. # This actually reads in from a file with lots of error checking. return "this", "that", "the", "other"; }; # the actual subroutine, the only thing callable outside of the closure sub get_init_strings { if (!@strings) { # only call $get_strings once @strings = $get_strings->(); } return @strings; } } # close closure } # close BEGIN block