箱作りたいなぁ
#!/usr/bin/perl
use strict;
use warnings;
my $file = 'commList.txt';
my $fh;
unless (open $fh, $file) {
print "can not open $!\n" if $!;
}
unless *出来なかったら
while (<$fh>) {
if ($_ =~ /^\s*\<a\shref=\"\/community\//) {
if ($_ =~ /(co[0-9]+).*alt=\"(.*)\"/) {
print "$2 ( $1 )\n";
}
}
}
マッチとか