Yeah, the following should work ok;
while (<FILTER>) {
if ($_ =~ /^(\n|#| )/) { next; }
# do whatever else you want to do here,...
} # end while
close(FILTER);
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
open(FILTER, "<spam.filter") or die "no such file or invalid path\n"; while (<FILTER>) {
if ($_ =~ /^(\n|#| )/) { next; }
# do whatever else you want to do here,...
} # end while
close(FILTER);
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!