in reply to Re^2: Critique of some perl code.
in thread Critique of some perl code.

[...] has implicitly done the defined test [...] for a while now

Do you know which version introduced that?

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^4: Critique of some perl code.
by Fletch (Bishop) on Apr 21, 2022 at 16:54 UTC

    It’s been a while but not specifically no. I may go diving through perldeltas because I’m curious myself.

    Edit: So . . .

    • perl5280delta notes the changes to the while documentation to its current state (commit 5e979393c70, issue).
    • perl518delta notes that while(each %h) was changed to imply while(defined($_ = each %h)) using the phrasing "like readline and readdir" so it's present before then.
    • The oldest possibly related change I've found was commit 54310121b44 which rolls up patches 5.003_86..5.003_95 where it changes perlsyn where the explicit version of the while loop given in the "Loop Control" section has a defined($line = <ARGV>) conditional, so I'm guessing it's possibly a 5.004-ism . . .
    • stopping poking for now . . .

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.