in reply to Passing Empty/ Undefined values to a subroutine
When I was a beginner I saw something that I thought was exactly like the behaviour you describe, in a situation where the call looked like, my_sub($arg1,,$arg2,,,$arg3) - obviously I was confused and what I thought from experience with another language would be an empty argument (the space between the commas) was actually a list of length 0, and therefore did not get passed.
The solution was to actually include an explicit value there. So I would recommend that you go back to your code and see whether you might just have a pair of commas there, and see if that is the issue.
If it is not, then please produce the smallest self-contained example that you can which runs and clearly demonstrates the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing Empty/ Undefined values to a subroutine
by chanio (Priest) on Jun 22, 2003 at 16:50 UTC | |
by tilly (Archbishop) on Jun 22, 2003 at 23:30 UTC | |
by bayruds (Acolyte) on Jun 23, 2003 at 03:17 UTC | |
by tilly (Archbishop) on Jun 23, 2003 at 05:49 UTC |