in reply to Error: Can't use global $^W in "my"
$ perl -MO=Deparse #!perl -w ^D BEGIN { $^W = 1; } - syntax OK [download]
use warnings; instead of -w will stop the warnings since you're using a recent perl.