You're probably thinking that the '-w' is supposed to cause warnings to be reported. And normally, it is.

However, the the first thing following -e is the script. And that's not the mini-script you wrote: it's the string 'w'. Perl treats that as a bareword and thinks you wrote a script that consists solely of the string 'w', which in a void context doesn't do anything. The 'if (undef() eq undef())...' is the first thing in @ARGV.

Change your perl -ew to perl -we and you might get something more like what you expected.