Gossamer Forum
Home : General : Perl Programming :

Re: [Watts] Question about pop and shift

Quote Reply
Re: [Watts] Question about pop and shift In reply to
Yeah, the following should work ok;

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!
Subject Author Views Date
Thread Question about pop and shift Watts 6757 Dec 19, 2003, 9:48 AM
Thread Re: [Watts] Question about pop and shift
Mark Badolato 6600 Dec 19, 2003, 10:08 AM
Thread Re: [Mark Badolato] Question about pop and shift
Watts 6615 Dec 19, 2003, 11:44 AM
Thread Re: [Watts] Question about pop and shift
Andy 6602 Dec 20, 2003, 2:36 AM
Post Re: [Andy] Question about pop and shift
Mark Badolato 6525 Dec 20, 2003, 8:45 AM