Advertisement
teknoraver

bianconizzatore

Jun 6th, 2014
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.42 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. # questo script Perl trasforma qualunque doc di testo in uno speech del Biancone
  4. # es. bianconizzatore /usr/share/doc/ubuntu-standard/copyright
  5.  
  6. while(<>) {
  7.     my @values = split(/\s/, $_);
  8.     if(@values == 0) {
  9.         print "\n";
  10.         next;
  11.     }
  12.     for(my $i = 0; $i < @values - 1; $i++) {
  13.         $values[$i] =~ s/[a-z]/u/g;
  14.         $values[$i] =~ s/[A-Z]/U/g;
  15.         print $values[$i].' ';
  16.     }
  17.     print $values[-1]."\n";
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement