It's a prototype.
Without the prototype, you'd have to do
pie sub { CODE }, SCALAR, LIST
or
pie &func, SCALAR, LIST
With the prototype, you can also do
pie { CODE } SCALAR, LIST
| [reply] [d/l] [select] |
Ikegami,
I see you disagree with Damian Conway (as expressed in Perl Best Practices--pp 194-196 for those of you following from home). I wish I understood better the exact thought processes behind each of your approaches.
Either way, yes, $^I is the way to go (or, if you really want to be a Boy Scout about it, use English, only without the evil regexp vars, and use $INPLACE_EDIT in place of $^I).
I like computer programming because it's like Legos for the mind.
| [reply] |
Another justifiction: $INPLACE_EDIT is "clearer" that $^I.
If you don't understand the process set in motion by setting an appropriate value into this magic variable, via either alias; and what constitutes an 'appropriate value'; and what other pieces of magical context are required to make it all work; then you are going to have to look it up. And it is just as easy to look up $^I as it is to lookup $INPLACE_EDIT.
And if you are familiar with the requirements and effect of setting a value into that magic variable, then $INPLACE_EDIT is no clearer than $^I.
The former is in no way enough to explain what's going on, if you are unfamiliar with the operation.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
I can't comment until I know to what you are referring. What is on those pages?
| [reply] |
| [reply] |