James, The problem occurs when $q->param('next') returns a null of sorts because there is no such parameter in the URL. Apparently, this does not get passed.
When this is the case, all the subsequent function parameters are offset by one. Very strange... What a language... I'll try your suggestion of using scalar a little later... Siegfried --- James Edward Gray II <[EMAIL PROTECTED]> wrote: > On Saturday, May 31, 2003, at 05:01 PM, Richard > Heintze wrote: > > > Thanks James, I think I understand now! > > Glad to hear it. > > > Here is another topic: > > My, my you are quite the problem child today, aren't > you? ;) > > > What is happening to my second argument here? It > is > > not being passed! > > > > &print_args("abc", $q->param('next'), "xyz"); > > > > # However, if make a slight change, it works! > > my $n = $q->param("next"); > > &print_args("abc", $n, "xyz"); > > > > What is going on here? That was nasty! > > Hmm, the only difference I can see between these two > calls is the > context. The first call is in list context, because > of the subroutine > call, but the second is scalar context as it is an > assignment to a > scalar variable. Does it work, if you change the > first call to: > > print_args("abc", scalar $q->param('next'), "xyz"); > > ??? If that works, it's a context issue. > > Consulting 'perldoc CGI' we can see that param() > will return an array > in list context for multivalued parameters. If that > happened I'm > guessing you had more entries than you thought in > that subroutine call > and probably didn't see 'xyz' print out, unless it > returned an empty > list which I can't think of any reason it would do > if you know there's > a value in there for the scalar call. > > That's my best guess there. If that doesn't help, > you need someone who > knows more about CGI than me. :D > > Good luck. > > James > > P.S. You don't need those '&' on the sub calls and > eventually, they're > going to surprise you. Go ahead and drop them. > > P.P.S. Your variable names aren't improving, don't > make me beat you > with the I-Will-Name-My-Variables-Well-Stick! :) > __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]