From 29f00aba2702283fb5f5e8ada41e530765e96b61 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Tue, 15 Feb 2011 18:13:00 -0700 Subject: [PATCH] Use decent regex. --- lib/Parser/IRC.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Parser/IRC.pm b/lib/Parser/IRC.pm index 73adffa..b809aaf 100644 --- a/lib/Parser/IRC.pm +++ b/lib/Parser/IRC.pm @@ -6,6 +6,7 @@ use strict; use warnings; use API::Std qw(conf_get err awarn trans); use API::IRC; +use Data::Dumper; # Raw parsing hash. our %RAWC = ( @@ -53,8 +54,9 @@ sub ircparse my ($svr, $data) = @_; # Split spaces into @ex. - my @ex = split(' ', $data); - + my @ex = split /\s+/, $data; + print Dumper(@ex); + # Make sure there is enough data. if (defined $ex[0] and defined $ex[1]) { # If it's a ping...