lisaw has asked for the wisdom of the Perl Monks concerning the following question:
thanks...still kinda new to this :(sub BuildMMList { local ( $style ) = @_; local ( $ret, $idx ); local ( *LIST ); local ( $line, @data, $key, %user, @ch ); $ret = ''; $idx = 0; open( LIST, "<$MM_FILE" ) || &Error( "internal", "Missing page lis +t" ); while ( $line = <LIST> ) { # see if it's a page. next if ( $line =~ /^#/ ); next if ( $line =~ /^\s+$/ ); $idx++; # remove white space. $line =~ s/^\s*//; $line =~ s/\s*$//; # display the table row if ( $style eq 'delete' ) { # !EMBEDDED HTML! $ret .= <<EOF; <TR> <TD> <INPUT NAME="page$idx" TYPE="hidden" VALUE="$line"> <INPUT NAME="action$idx" TYPE="checkbox" VALUE="delete"> <CODE>$line<\/CODE> </TD> </TR> EOF } else { # !EMBEDDED HTML! $ret .= <<EOF; <OPTION>$line EOF } } close( LIST ); $_ = $ret; } Data File Example: default1``default2``default3
edited: Wed Oct 23 21:17:35 2002 by jeffa - remember kids, always escape those embedded code tags ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split a database
by lisaw (Beadle) on Oct 23, 2002 at 21:23 UTC | |
by particle (Vicar) on Oct 24, 2002 at 00:15 UTC | |
|
Re: Split a database
by robartes (Priest) on Oct 23, 2002 at 21:29 UTC |