I used the following code to write out all my hidden fields. It didn't get rid of the newline or caridge return characters at the end though.
foreach my $item (@Draw){ my $counter = 0; my $daValue = $item; chomp($daValue); print "<input type='hidden' name='drawHidden' value='$daValue'>\n"; $counter++; } I accessed and created the array with this code: my @Draw = $cgi->param("drawHidden") || ""; Any ideas why I can't get rid of the ending characters? (besides the fact that I really have no idea what I'm doing? 8^) -James ----Original Message Follows---- From: fliptop <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: James Woods <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: mysterious leading spaces (same foreach problem w/ more details) Date: Mon, 11 Mar 2002 19:41:45 -0500 James Woods wrote: >That leading space is causing me headaches. when trying to do a foreach >on the array, after submitting the form. instead of packing a huge array into one form var like this: <input type='hidden' name='drawHidden' value='@Draw'> why not pass it like this (in your html): <input type="hidden" name="drawHidden" value="$Draw[0]"> <input type="hidden" name="drawHidden" value="$Draw[1]"> etc... then you can process it as such: @drawHidden = $cgi->param('drawHidden'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] James Woods Web Developer for Christ by night WebMaster at http://www.tacoma.washington.edu by day Web Applications and Cold Fusion Programming [EMAIL PROTECTED] _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]