Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Passing a scalar to a subroutine

by Anonymous Monk
on Feb 02, 2012 at 15:22 UTC ( #951466=note: print w/ replies, xml ) Need Help??

in reply to Passing a scalar to a subroutine

Actually argument passing isn't the problem in your code. Since you define $value in a file scope, it's visible to your subroutine w/o being passed.

If I may draw your attention to something else?

chomp ($input = <STDIN>); $input = $value; # <--- are we sure about this?!? #call subroutine to check user input verification($value)

If I may suggest $value = $input?

Comment on Re: Passing a scalar to a subroutine
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2015-11-28 18:52 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls