in reply to Functions Signatures
You can always declare subs:
sub Hello;
It doesn't show what kind of arguments it expects, because the definition of the sub doesn't see so either. You could use prototypes, but be aware of the results. Prototypes aren't as useful as you may think. If you use prototypes, write:
sub Hello ($);
but then you have to repeat that prototype when defining the function:
sub Hello ($) { my ($text) = @_; print $text; }
Abigail
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Functions Signatures
by crouchingpenguin (Priest) on Jul 17, 2003 at 22:29 UTC | |
Re: Re: Functions Signatures
by nofernandes (Beadle) on Jul 17, 2003 at 12:15 UTC | |
by Abigail-II (Bishop) on Jul 17, 2003 at 12:24 UTC | |
by nofernandes (Beadle) on Jul 17, 2003 at 13:33 UTC | |
by Abigail-II (Bishop) on Jul 17, 2003 at 14:26 UTC |
In Section
Seekers of Perl Wisdom