Re: Selection of questions
Joel Palmius <[email protected]>
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
I think that's one of the most beautiful pieces of code I've ever seen,
but I'm a bit perverse that way. I would never have thought of it. :-)
// Joel
On Tue, 2 Nov 2004, Michael Waider wrote:
> On Saturday, 30. October 2004 17:54, Martin Ertl wrote:
>> I remember Mike once did random selection by using a workaround
>> with pre-parsed perl snippets:
>>
>> for example on a ROUTE-tag:
>> build an array with all possible followers, then select one of
>> them with rand() function and print this to CONTINUE parameter
>
> Looked like this:
>
> <ROUTE CONTINUE="{/
> srand(time);
> @route=('alt1.survey','alt2.survey','alt3.survey');
> print $route[int(rand(3))];
> /}" />
>
> hth + Cheers Mike
>
> --
> eveca GmbH - Internet & Befragungen - http://eveca.de
> Fon: 0941/785368-0 - Fax: 0941/785368-99
> Skickat av Michael Waider <[email protected]>
> till survey-discussion
>
Skickat av Joel Palmius <[email protected]>
till survey-discussion