http://qs321.pair.com?node_id=275186


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

    In addition, you can also

    use subs qw( sub_name_one sub_name_two etc );

    cp
    ----
    "Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."
Re: Re: Functions Signatures
by nofernandes (Beadle) on Jul 17, 2003 at 12:15 UTC

    Ok.. but so i cannot show the arguments of the file?

    Ok thank you very much!!

      Arguments of the file? What do you mean by that?

      Abigail

        .. I made a mistake.. not arguments of a file!! Arguments of the function!!

        Sorry.. i was distracted!!

        Nuno