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 tr bgcolor='$rowColor'\n;
print
-0500
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
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 problem w/ more
details)
Date: Tue, 12 Mar
When first running the page, the table is populated with all the records
that it should be populated with. After hitting End Phase, the table only
contains the first record. I'm passing the @Draw as a hidden form field.
I've got 4 test print statements that print out @Draw (so I can see the
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
[repost with better subject and code put directly into the message]
Ok, I'm getting closer thanks to the help of all the experts out here!! I'm
totally thankful for all of your help.
At http://staff.washington.edu/guru/cards2.cgi when you hit End Phase it
passes, as a hidden form field, the
Duh, forgot to change the extention from .cgi to .txt
Ok, I'm getting closer thanks to the help of all the experts out here!! I'm
totally thankful for all of your help.
Now, I've rewritten most of what I had before, using suggestions and
examples from our resident Perl Pros.
While I'm closer
I've got a file that I would like to import into a list. The file has many
rows, and each row has 3 records, seperated with a |.
Example of file is as below:
f|Axe Strike|d
f|Disquiet of our people|p
f|Dwarven Armor|p
When I was just using 1 record in the file, @Array = FILE ended up working
OK, you're totally right, I should have printed my code 8^( I figured that
it would be totally easy... then I remembered that I'm a noobie and
everything is confusing 8^)
First, let me say that I'm trying to get work to buy me a Perl book, but
money at the state is tight these days. I've
that I'm just missing some @rray thing (being 0-based and all),
but I just can't see what I'm doing wrong.
I appreciate all the help!
-James
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
{
/table
div style=font-size:2em;Played Cards/div
select name=playedCards size=10};
foreach my $item (@playedCards){
print option value='$item',$item,/option;
}
print qq{
/selectbr /
input type=submit value=Update
/form
/body
/html
}
James Woods
Web Developer for Christ
11 matches
Mail list logo