Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Passing a scalar to a subroutine

by moritz (Cardinal)
on Feb 01, 2012 at 12:52 UTC ( #951203=note: print w/ replies, xml ) Need Help??


in reply to Passing a scalar to a subroutine

Passing arguments to subroutines in explained in perlintro and perlsub. To make it short, all the arguments are available in the special variable of name @_.

So your sub should start like this:

sub verification { my $value = shift; # accesses @_ ...

See also: shift.


Comment on Re: Passing a scalar to a subroutine
Download Code
Replies are listed 'Best First'.
Re^2: Passing a scalar to a subroutine
by rspishock (Monk) on Feb 01, 2012 at 13:03 UTC

    Outstanding, thanks for the help, it worked. Thanks for also providing me with some material to read on subroutines, I'm sure they'll be helpful with what I'm working on.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-08-03 01:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (19 votes), past polls