Skip to content

Instantly share code, notes, and snippets.

@tabris2012
Created June 25, 2012 07:50
Show Gist options
  • Save tabris2012/2987230 to your computer and use it in GitHub Desktop.
Save tabris2012/2987230 to your computer and use it in GitHub Desktop.
open ATTR, "<attribute.txt" or die "open: $!";
@attr = ();
$i =0;
while ($line = <ATTR>) { #属性示唆単語読込み
if ($line =~ /^#/) {
next;
}
elsif ($line eq "\n") {
$i++;
}
else {
chomp $line;
push @{$attr[$i]}, $line;
}
}
close ATTR;
for ($i =0; $i < @attr; $i++) {
foreach $line (@{$attr[$i]}) { #対応単語の表記を変更
$$document =~ s($line)(<u>$line</u>)g;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment