in reply to Re: Re: (jeffa) Re: 'print' puzzle
in thread 'print' puzzle

Yes that helps. You say that the parens don't affect it. The "if it looks like a function" rule tells it were the parameter list ends, but the determination that the first argument doesn't have a comma after it must come after that.

So... why doesn't it know that's a function already? The module was "use"d, so it knows what's inside it.

Replies are listed 'Best First'.
Re: (jeffa) Re: 'print' puzzle
by clintp (Curate) on Nov 13, 2001 at 04:25 UTC
    There are so many exceptions and interpretations to the "if it looks like a function" rule that it's almost more of a pain than a help. Just let it go. To your second comment, it knows that it's already a function but it doesn't matter -- it could also still be a filehandle. Remember you don't "predeclare" filehandles in any way. And Perl's kinda looking for a filehandle there anyway and your function name will suit just fine.