lisaw has asked for the wisdom of the Perl Monks concerning the following question:
Company 1 -Company 1 sub link 1 -Company 1 sub link 2 Company 2 -Company 2 sub link 1Here's my code:
My subdirectory flat file db contains:{ &directories; } sub directories { $database="company_file.dat"; open(FILE, $database) || die "can't open"; @list = <FILE>; close(FILE); $numlist = @list; print "Content-type: text/html\n\n"; print <<"EOF"; Company Listings: EOF for ($a = 0; $a < $numlist; $a ++) { ($company, $url, $directory) = split(/\|/, $list[$a]); print "$company, $url, $directory<BR>\n"; } close(FILE); } 1;
Any suggestions...or links to existing examples would be greatly appreciated... lis$company, $sub-url, $sub-directory, $sub-maindir
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Flat File Question
by hmerrill (Friar) on Oct 24, 2003 at 18:58 UTC | |
by lisaw (Beadle) on Oct 24, 2003 at 23:48 UTC | |
by hmerrill (Friar) on Oct 27, 2003 at 14:45 UTC | |
by hmerrill (Friar) on Oct 27, 2003 at 17:24 UTC | |
|
Re: Flat File Question
by Art_XIV (Hermit) on Oct 24, 2003 at 19:06 UTC | |
|
Re: Flat File Question
by hardburn (Abbot) on Oct 24, 2003 at 18:26 UTC | |
by lisaw (Beadle) on Oct 24, 2003 at 18:34 UTC | |
by jZed (Prior) on Oct 26, 2003 at 03:00 UTC | |
|
Re: Flat File Question
by graff (Chancellor) on Oct 25, 2003 at 15:32 UTC |