$ t() { perl -Mv5.40 -e' no if $ARGV[0], "autovivification"; my @a; push @a, [ exists(&nonesuch) ]; say $a[0][0] ? "exists" : "doesn\x27t exist"; ' "$@" } $ t 0 doesn't exist $ t 1 Modification of a read-only value attempted at -e line 4.