On Tue, Aug 4, 2009 at 19:30, Dave Tang<d.t...@imb.uq.edu.au> wrote:
snip
>                sub compare($$) {
snip
> running this script, but just wanted to know its purpose in compare($$).
snip

Those are [prototypes][1].  They change how Perl thinks about the
function call.  In this case it is telling Perl that compare expects
two scalars as arguments.  This looks more useful than it is. There
are many [pitfalls][2] to prototypes and they should really not be
used unless you have a really good reason.

[1] : http://perldoc.perl.org/perlsub.html#Prototypes
[2] : http://www.perl.com/language/misc/fmproto.html

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to