Rajeev Prasad wrote:
Hello,
Hello,
from here: http://www.troubleshooters.com/codecorn/littperl/perlsub.htm
i found:
In Perl, you can pass only one kind of argument to a subroutine: a scalar.
To pass any other kind of argument, you need to convert it to a scalar. You
do that by passing a reference to it. A reference to anything is a
scalar. If you're a C programmer you can think of a reference as a pointer
(sort of).
is that still true? date on website is 2003...
On that web page it says:
<QUOTE>
NOTE: Modern Perl versions (5.003 and newer) enable you to do function
prototyping somewhat similar to C. Doing so lessens the chance for wierd
runtime errors. Because this page was created before Perl prototyping
was common, much of its code is old school. This will change as time
goes on.
</QUOTE>
Which leads me to believe that it is based on Perl 4 code and should be
ignored.
Please don't let friends use prototypes in perl.
http://perlmonks.org/?node_id=861966
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/