Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Functions Signatures

by Abigail-II (Bishop)
on Jul 17, 2003 at 12:10 UTC ( #275186=note: print w/replies, xml ) Need Help??

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; }


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 );

    "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?


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

        Sorry.. i was distracted!!


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://275186]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2021-10-24 23:27 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.