$seach_wordに日本語を入れたいのですが、それだとマッチしません。どうすればよいでしょうか?
w3m -dump -cols 160
http://peace.2ch.net/test/read.cgi/tech/1349538519/| ~/Perl_instance/resSearch.pl
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
my $seach_word = ">1" ;
my $found_res = 0;
my $res = "";
while (<>) {
if (/^\d/x) {
# out put, flash
if ( $found_res == 1 ) {
print $res;
$found_res = 0;
}
$res = "";
}
else {
# searching
if (/$seach_word\b/x) {
$found_res = 1;
}
}
# buffer lines
$res .= $_;
}