tting up
with me for so many posts 8^) However, I'm sure that this will not be my
last post >8^) heh heh heh...
Bless both of you.
-James
Original Message Follows
From: "Tagore Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Subject: Re: mysterious leadi
James Woods wrote:
> So I guess my newest question is, what am I doing wrong to only print out
> the first record of @Draw?
It's hard to know for sure without seeing the code where you initialize
@Draw. I went back and looked at earlier posts, and your initial problem
(the leading spaces) was be
James Woods wrote:
> The above code works great when the @Draw is populated from my text file
> (which happens "pre-submission"). However, when the form is submitted,
> I only get the first record of @Draw.
if your passing all the data in one , retrieving it with
@Data = $cgi->param('drawHi
First off, thanks for helping me, I really appreciate it.
I'm printing out the @Draw using this code:
foreach my $item (@Draw){
my @foo = split(/\|/, $item);
my $rowColor;
if ($counter == 7){
$rowColor = "#c0c0c0";
}else{
$rowColor = "#ff";
}
print "\n";
print "\t$counter\n";
James Woods wrote:
>
> The code I was referring to was:
>
> foreach (@Draw) {
> s/\s+$//g; # remove all whitespace at the end of a row
> print "\n";
> }
>
Are you reading the data into an array in the script and then printing
the array using interpolation inside double quotes?
prin
James Woods wrote:
> Putting that code in place of the chomp code that was suggested earlier
> produced the same result.
i just tried this test case:
# one with blank spaces, two with a tab,
# three with a \n, four with several \n's
my @Data = ('one ', 'two ', 'three
', 'four
');
fo
fliptop wrote:
according to a 'view source' on the above url, your hidden input params
do indeed have a new line on the end.
try this (instead of chomp):
foreach (@Draw) {
s/\s+$//g; # remove all whitespace at the end of a row
print "\n";
}
James wrote:
Putting that code in place of
James Woods wrote:
> Here is the raw text from my text file (the original source). It's
> created on a Windows machine (??in case that makes a difference with
> linefeeds vs. carridge returns??) then put on an apache web server.
>
> f|Gimlis Axe|p|fellowship/large/14gimlisbattleaxe.html
> f|H
d. Oh well.
Thanks all for your help so far! It's been educational
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 proble
- Original Message -
From: "James Woods" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, March 11, 2002 10:56 PM
Subject: Re: mysterious leading spaces (same foreach problem w/ more
details)
> I used the following code to
James Woods wrote:
> 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 "\n";
> $counter++;
> }
>
> I
ECTED]>
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 d
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:
why not pass it like this (in your html):
etc...
then you can process it as such:
@drawH
OK, I've got a form where I'm passing an array via a hidden form field. The
problem is that (after submission) I'm getting a leading space at the
beginning of each 'record' after the first. In other words, the first
'record' is being passed as it should be, but each other record is being
prepe
14 matches
Mail list logo