| f00li5h | ailton: at all? |
| ailton | if("$var1 $var2" =~ /^good$/, /^really nice$/) { dothis... f00li5h: yes, thanks, just wanna see what anno mean |
| f00li5h | MADNESS |
| anno | quit concatenating the variables you won't get that watertight |
| ailton | just with f00li5h one I think |
| f00li5h | ailton: that's a great idea. |
| anno | check each one for the possible value(s). straight-forward and safe |
| f00li5h | and you can even use the grep thing i listed before then |
| ailton | if( $foo =~ /^good$/ and $bar =~ /^really\snice$/ ) will match: $foo good and $bar really nice not if foo is set to good really nice but back to thequestion |
| [miles] | good afternoon #perl ... I'm just trying to debug a SpamAssassin problem I am having, ... I'm using the LDAP scores, and I notice in my mail.log that it says "invalid credentials" ... and the line number.. I set the perl line manually with the username and password required for LDAP and it worked.. Now I notice that SA loads the ldap.cf file and the var "user_scores_ldap_password" is loaded. My password contains a # ... but when I put$ldap->bind("uid=sysadm,dc=localhost,ou=domains,dc=ldap,dc=com", password=>"secret#pass") it works fine... |
| f00li5h | ailton: now the contents in each variable is checked |
| ailton | instead of having 10 lines with checks for different combinations |
| [miles] | I assume I need some method of escaping or something... could anyone help me on this please? |
| ailton | can I have a little list of regexps o chack against? |
| f00li5h | [miles]: it shouldn't need escaping ailton: i told you how to do that already ailton: remember the thing with grep? |
| [miles] | f00li5h: well, it's weird, it always fails when loading from the file |
| f00li5h | [miles]: "it"? |
| ailton | f00li5h: it looked to complex too |
| f00li5h | ailton: how did it look complex? |
| [miles] | f00li5h: spamd[3978]: Invalid credentials at /usr/share/perl5/Mail/SpamAssassin/Conf/LDAP.pm line 161 |
| ailton | <f00li5h> eval: $foo = moose; [ grep $foo =~ $_ , qr/o/,qr/baz/, qr/./ ] <buubot> f00li5h: [qr/(?-xism:o)/,qr/(?-xism:.)/] |
| buubot | <f00li5h>: [qr/(?-xism:o)/,qr/(?-xism:.)/] |
| [miles] | f00li5h: if I set the password directly in on that line, it auths |
| f00li5h | [miles]: paste bin (/topic) the contents of the config file ailton: you don't need to look at that one, read the one before it, the one that said 2 |
| [miles] | f00li5h: not the perl script no? |
| f00li5h | [miles]: did you write the perl script? |
| [miles] | f00li5h: no |
| f00li5h | i won't help with that, you can get support for that from #your_application_here but if it's perl syntax or something like that, sure thing. |