1 # This example is from the Perl::Tidy man page
4 # some messy source code to format
7 my @editors=('Emacs', 'Vi '); my $rand = rand();
8 print "A poll of 10 random programmers gave these results:\n";
10 my $i=int ($rand+rand());
11 print " $editors[$i] users are from Venus" . ", " .
12 "$editors[1-$i] users are from Mars" .
17 # We'll pass it as ref to SCALAR and receive it in a ref to ARRAY
19 perltidy( source => \$source, destination => \@dest );
20 foreach (@dest) {print}