Guest User

Untitled

a guest
Nov 18th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. open ATTR, "<attribute.txt" or die "open: $!";
  2. @attr = ();
  3. $i =0;
  4.  
  5. while ($line = <ATTR>) { #属性示唆単語読込み
  6. if ($line =~ /^#/) {
  7. next;
  8. }
  9. elsif ($line eq "\n") {
  10. $i++;
  11. }
  12. else {
  13. chomp $line;
  14. push @{$attr[$i]}, $line;
  15. }
  16. }
  17.  
  18. close ATTR;
  19.  
  20. for ($i =0; $i < @attr; $i++) {
  21. foreach $line (@{$attr[$i]}) { #対応単語の表記を変更
  22. $$document =~ s($line)(<u>$line</u>)g;
  23. }
  24. }
Add Comment
Please, Sign In to add comment