Re: problem with readline

2007-06-23 Thread Mathew
Tom Phoenix wrote: > On 6/23/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: > >> foreach my $address (readline AUTHFILE){ >> chomp($address); >> next if $address =~ m/^#/gmx; > > The author of that code probably doesn't know what /g, /m, and /x do > for a pattern match. When you know how to

Re: problem with readline

2007-06-23 Thread Tom Phoenix
On 6/23/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: foreach my $address (readline AUTHFILE){ chomp($address); next if $address =~ m/^#/gmx; The author of that code probably doesn't know what /g, /m, and /x do for a pattern match. When you know how to use them, they're powerful tools.

problem with readline

2007-06-23 Thread Mathew Snyder
I have a script that queries a database, grabs a bunch of email addresses from it and generates a procmail ruleset for each of them. It also opens a file which contains additional email address and reads them into an array: open AUTHFILE, "connect("dbi:Pg:dbname=xx;host=10.0.2.30", "x", "