X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FQuotes.pm;h=0e50dd4569d4768648e0d9ef3101ead167368059;hp=42fbc80ca8c3680b6fba24ab8e60ecbb6a405b3e;hb=b3ae591da9a5de242bbadc3aa975c1c1ec505cd8;hpb=91367351091157a6b2dc887e51e2c5bc2bf093ae diff --git a/Commands/Quotes.pm b/Commands/Quotes.pm index 42fbc80..0e50dd4 100644 --- a/Commands/Quotes.pm +++ b/Commands/Quotes.pm @@ -66,6 +66,7 @@ command findquote => { help => q(syntax .findquote pattern | findqre lets you use a regex pattern), alias => q(findqre), }, class extends NDIRC::Command { + my $file; method execute($c,$pattern) { die 'ARGS' unless $pattern; @@ -80,7 +81,7 @@ command findquote => { }else{ $matcher = '(index uc($_), uc($pattern)) != -1'; } - my $file = new File::Temp( SUFFIX => '.txt' ); + $file = new File::Temp( SUFFIX => '.txt' ); my $n = 1; my $match = 0; for (@FILE){