From: Wizard <wi...@ne...> - 2003-02-17 19:17:08
|
> > foreach( split /\,\s*/, $blocked_users ) { > > push @bad_users, $_; > > } > > Why not use a list rather than a scalar, it would be consistent with our > other config directives and save on this step. $blocked_users is read externally from the configuration file, like so: === /.conf/.nms.cfg ===================================== Blocked_users = fr...@fr..., ch...@ch..., ox...@bi... =========================================================== That's what the split is for. It could've been space separated, but I thought it would be more readable this way. > I'd probably throw a 'last' in here. Only one match is needed. Then > again, see note about premature optimisation below :) good point. done. > Yeah, no point in premature optimisation. Compared to the overhead of > compiling the cgi script I doubt anything is going to make that much > difference to the overall speed of execution... I actually plan on profiling the whole thing, over time. I don't plan on anything more than looking for bottlenecks for the first round. Thanks, Grant M. |