When scalars are passed to a function, e.g. open they are copied (not passed by reference).
I was wrong about them not being passed by reference to subs/functions (i.e. the calling convention), but not about them being copied, at least when people use the parameters the usual way. I was mistaken precisely because whenever I define subs I never use @_ directly. As a result, I formed a long standing misimpression of the calling convention. I simply didn't want others to make the mistake I did or to think that they could freely pass tied scalars into subs (or functions) without knowing how they were going to be used internally.
As for "crying foul" - that makes this sound like a fight. I'm here to learn, not to argue. Perhaps those aren't your goals?
In my opinion, trying to understand why someone made a mistake is as important as correcting them. And for me, it is an essential part of not repeating my own. I never was much of a rote learner.
Best, beth
In reply to Re^5: Using a tied scalar as an in memory file
by ELISHEVA
in thread Using a tied scalar as an in memory file
by duncs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |