in reply to Re: Tiny Perl puzzle
in thread Tiny Perl puzzle

I wasn't even trying to guess what it would really parse as so I just Deparse and run it

Replies are listed 'Best First'.
Re^3: Tiny Perl puzzle
by davido (Cardinal) on Jun 06, 2014 at 18:43 UTC

    I think B::Deparse gets it wrong -- as it sometimes does -- when you add -p:

    My theory: When Deparse tries to add parens wherever it can, it treats the first two as a function call (which was my first guess too). But as tobyink correctly surmised, that first two is treated by print as a filehandle.

    This is confirmed by the more low-level output of B::Concise:


    Dave

        I can't test ATM

        You gotta stop saying that :)

        Contrary to AnoMonk I doubt space matters.

        Sure it does, it matters how Deparse places the space, because it matters to perl

        That is exactly as deparsed with -p, behaves exactly like the original