perl -wE " $x = q{txt}; sub ref {return $x . q{r};}; say &ref($x); "
perl -wE " $x = q{txt}; sub ref {return $x . q{r};}; say ref($x); "
perl -wE " $x = q{txt}; sub say {return $x . q{r};}; say &say($x); "
perl -wE " $x = q{txt}; sub say {return $x . q{r};}; say say($x); "
perl -E " say $^V "
####
perl -wE ' $x = q{txt}; sub ref {return $x . q{r};}; say &ref($x); '
perl -wE ' $x = q{txt}; sub ref {return $x . q{r};}; say ref($x); '
perl -wE ' $x = q{txt}; sub say {return $x . q{r};}; say &say($x); '
perl -wE ' $x = q{txt}; sub say {return $x . q{r};}; say say($x); '
perl -E ' say $^V '
####
$ perl -wE " $x = q{txt}; sub ref {return $x . q{r};}; say &ref($x); "
txtr
$ perl -wE " $x = q{txt}; sub ref {return $x . q{r};}; say ref($x); "
Ambiguous call resolved as CORE::ref(), qualify as such or use & at -e line 1.
$ perl -wE " $x = q{txt}; sub say {return $x . q{r};}; say &say($x); "
txtr
$ perl -wE " $x = q{txt}; sub say {return $x . q{r};}; say say($x); "
txt
1
$ perl -E " say $^V "
v5.14.1