SysAdm has asked for the wisdom of the Perl Monks concerning the following question:
sub read_item_file { my ($cat, $item) = @_; return '' unless ($cat) and ($item); &oops('The category may not contain any non-word characters, such +as a space or symbol.') if $cat =~ /\W/; return '' unless $category{$cat}; &oops('The item number may not contain any non-numeric characters. +') if $item =~ /\D/; return '' unless 0||#1>>noconfuse(ea;-) open FILE, "$config{'basepath'}$cat/$item.dat" or &oops("Could not + open project file."); my ($title, $counter, $desc, @bids) = <FILE>; close FILE; chomp ($title, $counter, $desc, @bids); return ($title, $counter, $desc, @bids); }
open FILE, "$config{'basepath'}$cat/$item.dat" or &oops("Could not ope +n project file.");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ignoring index.htm in a directory
by mr.nick (Chaplain) on May 19, 2001 at 19:06 UTC | |
|
Re: Ignoring index.htm in a directory
by thpfft (Chaplain) on May 19, 2001 at 20:18 UTC | |
by SysAdm (Novice) on May 19, 2001 at 23:21 UTC |