Advertisement
teknoraver

irc2quotes

Aug 12th, 2015
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.40 KB | None | 0 0
  1. #!/usr/bin/perl -w
  2.  
  3. my $lastquot = '';
  4. while(<>) {
  5.     $quot = /<(.*)> (.*)/;
  6.     $quot = $1;
  7.     $line = $2;
  8.     if($lastquot ne $quot) {
  9.         print \n" if($lastquot);
  10.         print "$quot: «";
  11.         $lastquot = $quot;
  12.     } else {
  13.         print "\n";
  14.     }
  15.  
  16.     $line =~ s/a'/à/g;
  17.     $line =~ s/e'/è/g;
  18.     $line =~ s/i'/ì/g;
  19.     $line =~ s/o'/ò/g;
  20.     $line =~ s/u'/ù/g;
  21.     $line =~ s/\.\.\./…/g;
  22.     print $line;
  23. }
  24. print \n";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement