develooper Front page | perl.beginners | Postings from March 2002

Re: from file to a list containing lists (repost w/ code)

James Woods
March 5, 2002 17:17
Re: from file to a list containing lists (repost w/ code)
Message ID:
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 to my desired outcome, I'm still not there; here is my
current problem.

at when you hit "End Phase" it
passes, as a hidden form field, the contents of @Draw. (I'm not even
bothering to check any boxes yet.. I need to be sure that no matter what I
pass the proper @Draw every time).

The first time you hit "End Phase" it's great.  However, subsequent times,
loses the \n\r at the end of each line and gains two spaces. How should I
handle this?  Should I detect whether or not $Draw contains /\n\r/ and then
split on that, and if not split on /  /?  (and if I should do that, how do I
do that 8^).

Or, should I make sure that I pass the same thing every time and then not
have to worry about what the delimiter should be?  (and if I should do it
that way... uh... how do I to that? ;^)

I hope that makes sense to an expert out there.

Any suggestions on what I should do?

I really am learning though!!  I've finally got my boss to get me 'Learning
Perl 3rd Ed.' and 'Effective Perl Programming'.  Should pick them up
tomorrow 8^)



Join the worldÂ’s largest e-mail service with MSN Hotmail. Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About