lisaw has asked for the wisdom of the Perl Monks concerning the following question:
Here's what I get to work with...Entry 1 Entry2 Entry 3 Entry 4 Entry 5 Entry6 Etc. Instead of... Entry 1 Entry 2 Entry 3
Thanks Again! Lisa&parse_form; $database='categories.dat'; if ($input{'database'} eq ''){ $db=$database; }else{ $db=$input{'database'}; } open (ORGDB,"<$database"); @ODB=<ORGDB>; close (ORGDB); shift @ODB; @ODB = sort(@ODB); foreach $rec (@ODB){ chomp($rec); ($Category)=split(/\|/,$rec); print "<tr><td valign=top width=65> <B>Category: </B>$Category<BR></td></tr>\n"; } sub parse_form { read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); if (length($buffer) < 5) { $buffer = $ENV{QUERY_STRING}; } @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $input{$name} = $value; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Database Layout
by tilly (Archbishop) on Jan 31, 2002 at 02:44 UTC | |
by biograd (Friar) on Feb 01, 2002 at 04:13 UTC | |
|
Re: Database Layout
by gav^ (Curate) on Jan 31, 2002 at 02:14 UTC | |
|
Re: Database Layout
by screamingeagle (Curate) on Jan 31, 2002 at 02:36 UTC | |
|
Re: Database Layout
by Fletch (Bishop) on Jan 31, 2002 at 05:51 UTC |