note
JavaFan
<blockquote><em>Don't call your subroutines with a prepended "&". It is "old style" dating back to Perl 4! The effect of it now is that any prototypes are ignored. In the few cases they are actually usefully used, you surely do not want to do that and in all other cases it saves you one character less to type.</em></blockquote>
Yeah, except in this case, things will break.
<p>
Please, <em>think</em> before giving Pavlov reactions. Don't trigger a standard response to seeing a <c>&sub</c>. The use of <c>&read</c> is completely justified in this case, and your suggestion will break the construct. And not because of the prototype.
<p>
Besides, there's no need to look down on constructs that predate Perl5. Regular expressions are "perl4" (actually, older than that). Many keywords are from the pre-perl5 era. And it's kind of silly to first say "don't use prototypes - in fact, try to forget they exist" and then "don't use <c>&sub</c>, because that bypasses prototypes".
957430
957511