in reply to Re: dividing a hash by sets of $num
in thread dividing a hash by sets of $num

I thank you for your wisdom but I hope you don't mind me asking you a question or two about your example.

By param do you mean url_param for the page? I thought if it was given by the browser, it had to be url_param. I've never really tried it the way you do everything else..perhaps I should.

We have 13 keys.. --page 2-- $begin would be (2) * 6 = 12 $end would be 12 + 6 = 18. Page two would display items 12-18 which would actually be 7 numbersm +right?

Replies are listed 'Best First'.
Re: Re: Re: dividing a hash by sets of $num
by BUU (Prior) on Mar 14, 2004 at 20:59 UTC
    1) By param I meant a key=value paramater passed to your script via CGI (I'm assuming this is cgi). These come in two forms, a "post" type, and your script reads those via STDIN and "get" types, which come after the question mark in the url. CGI.pm decodes both of these and gives you the value(s) with the method "param". Note that if there are any "posted" paramaters, CGI.pm will only return those when you call param, it will ignore any params in the "get" request.
    #incoming url = script.cgi?foo=bar&baz=qux my $c = CGI->new(); print $c->param('foo'); #prints bar print $c->param('baz'); #prints qux
    2) Uh, I guess. Thats an implementation issue, doesn't really matter.