User:Texas.william/perl/zomdic
From The Urban Dead Wiki
Jump to navigationJump to search
#!/usr/bin/perl open FIN,'data' or die "file not found"; @data=<FIN>; close FIN; print "$#data lines read.\n"; open FOUT,'>newdata' or die 'unable to open file newdata for writing'; foreach(@data) { if (! /^#/) { s|^'{3}(.*?)'{3}|<span id="$1">'''$1'''</span>|; } print FOUT; } close FOUT; print "Operation completed.\n"