summaryrefslogtreecommitdiffstats
path: root/scripts/grep.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/grep.pl')
-rw-r--r--scripts/grep.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/grep.pl b/scripts/grep.pl
index 976d867..35ce15c 100644
--- a/scripts/grep.pl
+++ b/scripts/grep.pl
@@ -57,7 +57,7 @@ sub cmd_grep {
$cmd = join(' ',@args);
# check if the regexp is valid
- eval("'' =~ /$match/");
+ eval { qr/$match/ };
if($@) { # there was an error
chomp $@;
Irssi::print($@,MSGLEVEL_CLIENTERROR);