Your skill will accomplish what the force of many cannot |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm not clear on what you want to do, but if you want to pass the return value of func1() to func2() and the return value of func2() to func3() then you just have to:
if you're looking to abuse some perl internals, then you can using the special variable @_ and function passing using &subroutine. When you call a function like this: &foo; foo is passed the current value of @_. Also, did you know that manipulating @_ inside a function actually manipulates the passed variables? Kinda like pass by reference in c. check this out:
I don't know which you're trying to accomplish, but becareful using these tricks as it could have unwanted side effects. Also note that calling a sub routine like this: &foo() over rides the default behaviour of passing @_ to the function and sends it an empty list (). hope that helps, -brad.. In reply to Re: Style & subroutine organization
by reyjrar
|
|