Hi, I have a strange problem. You see, Though I am aware of modules such as POE::Component::IRC and such, I am writing an IRC bot with IO::Socket because I find it to be much more involved, and I needed something that I had complete control over as well as learn the RFC for IRC and concentrate on improving my regex skills. I was unsure either to put this under beginner or regex so please don't flame me for this, I'm unsure of the true problem but think it may be something to do with it-

I made two scripts, one that takes a regex line into an if statement with an actual example, to check that my regex matches correctly, the regex was simply copied and pasted t ensure they were the same.. The test script returns that the regex in fact does match. but in the irc bot script, when it recieves the data, it does not.

(I looked for any posts regarding rules to see if I'm not supposed to put in links, but did not see anything, so please redirect me if I am mistaken) I sent it to pastebin so it didnt spam 2 pages of the forum:

the reason for $1, $3, and $4 is because $2 is either @ or -, since the irc server I'm connected to is sometimes - and sometimes its reported as @, but if I removed the ()'s from (\@|\-) would that still work?

here is an example format of the irc server output in which the join regex would match, if it helps:

Oh yeah, sorry. So, is there any idea as to why these regex's aren't matching at all? the if statement appears to be coming false on the irb bot script, and I have taken the output from the socket on my terminal and put it in my regex testing script and the statement comes to be true..

Oh yeah, sorry. So, is there any idea as to why these regex's aren't matching at all? the if statement appears to be coming false on the irb bot script, and I have taken the output from the socket on my terminal and put it in my regex testing script and the statement comes to be true..

I don't know why that is. Maybe ask on www.perlmonks.com and see if anyone has a suggestion. -------------------------------------------------