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

Re^2: Invalid argument

by Andrew_Levenson (Hermit)
on Dec 01, 2006 at 20:21 UTC ( #587288=note: print w/ replies, xml ) Need Help??


in reply to Re: Invalid argument
in thread Invalid argument

Liverpole -- I know I have a newline in my arguments, but I also have them being chomped in the subroutine. :-\
That's why i'm so confused.


Comment on Re^2: Invalid argument
Re^3: Invalid argument
by grep (Monsignor) on Dec 01, 2006 at 20:27 UTC
    Because handlefix(); sends nothing to @_ in your sub.

    Take a look at perlsub, @_ is local

    grep
    XP matters not. Look at me. Judge me by my XP, do you?

Re^3: Invalid argument
by liverpole (Monsignor) on Dec 01, 2006 at 20:30 UTC
    Whoops -- didn't read that far :-/

    It's because you're not passing @_.

    You could fix this with:

    handlefix(@_);
    but it's really better practice to chomp the variables on input, and assign them to actual variable names, leaving @_ to its better purpose of the default argument list.

    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2015-07-07 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls