http://www.perlmonks.org?node_id=226656


in reply to Re: Re: getting 0 to print
in thread getting 0 to print

I have never seen this ...

$_ = "" => next unless defined;

... before. Could you explain how that works.

I'm not sure what part puzzles you, so...

(You can find all details in perlsyn and perlop.)

In other words, that line is just one of the many variations of writing:

unless (defined $_) { $_ = ""; next }

— Arien