On 06/23/2007 03:18 AM, Mathew Snyder wrote:
You'll notice in the section that creates the filehandle I have a statement that says "next if $address =~ m/^#/gmx;". I had to escape the "#". Can anyone tell me why that is? It isn't a special character for regexes that I've ever seen used.

Thanks,
Mathew

Why did you change the subject to "nevermind"? The subject didn't change.

You used the /x modifier which allows for comments within regular expressions. Remove /x, and the old regex will work as expected.

Read "perldoc perlre" too.

You also could have written it this way:

open AUTHFILE, "</home/customercare/authorized_users.txt"
  or die "Can't open file: $!";
@email_list = grep !/^#/, <AUTHFILE>;
close AUTHFILE;




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to