in reply to <STDIN> not initializing $_

Yes, while (<STDIN>) { ... } is special in that it:
  1. Reads a line from STDIN
  2. Assigns the line to $_
  3. Exits the loop if STDIN was at EOF before the read
Invoking <STDIN> by itself just reads a line but doesn't automatically assign it to $_.

Note that this is different from merely testing whether or not $_ is true as is shown by this example:

$/ = "0"; while (<DATA>) { print "got $_ and it ", ($_ ? "is" : "is not"), " true\n"; } __END__ 00000
which emits:
got 0 and it is not true got 0 and it is not true ...