[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] random number
Grant [listbox@email.com] wrote:
>
> I'm trying to generate a random integer between 0 and 250 and the following
> doesn't return anything:
>
> [perl]
> $Scratch->{random_number} = int rand(250)
> undef;
> [/perl]
>
> [scratch random_number]
>
> Can someone tell me what I'm doing wrong?
>
The main thing is that you don't appear to be reading your error.log
file(s).
If your log states "Safe: syntax error..." then you could try
terminating the appropriate lines of your Perl code with a ';'.
If your log states "Safe: rand trapped by operation mask..." then
you could try adding 'rand' to the SafeUntrap directive's list, in
your interchange.cfg file.
If there's another problem with that code (which I doubt) then its
cause is likely to have been reported in your error.log(s).
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/