$ perl -Mstrict -Mdiagnostics -E 'my $a = "3"; say $a->[0];' Can't use string ("3") as an ARRAY ref while "strict refs" in use at -e line 1 (#1) (F) You've told Perl to dereference a string, something which use strict blocks to prevent it happening accidentally. See "Symbolic references" in perlref. This can be triggered by an @ or $ in a double-quoted string immediately before interpolating a variable, for example in "user @$twitter_id", which says to treat the contents of $twitter_id as an array reference; use a \ to have a literal @ symbol followed by the contents of $twitter_id: "user \@$twitter_id". Uncaught exception from user code: Can't use string ("3") as an ARRAY ref while "strict refs" in use at -e line 1.