http://www.perlmonks.org?node_id=225033


in reply to Re: dynamically initializing variables with perl
in thread dynamically initializing variables with perl

I wouldn't use the map, though it's popped up a few times recently. What if someone passed parameters such as this?

C1 = 1 C2 = 1 C2 = 0 C2 = 1 C3 = 0

You'll end up with an array of (1, 1, 0, 1, 0) when you're only expecting three checkboxes.

Replies are listed 'Best First'.
Re: Re: Re: dynamically initializing variables with perl
by busunsl (Vicar) on Jan 08, 2003 at 06:59 UTC
    I suppose the checkboxes are created dynamically since it is a mail app.
    So they will be named uniquely and this shouldn't be a problem.

      You're right, it shouldn't be a problem, if you trust the client. Never trust the client.