Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > b85a231f3c8113eb2cdfc060db66cb64 > files > 15

perltidy-20090616-3.fc13.noarch.rpm

#!/usr/bin/perl -wn

# This program was posted on the MacPerl mailing list by 
# Charles Albrecht as one way to get perltidy to work as a filter
# under BBEdit.

use Perl::Tidy;

BEGIN { my $input_string = ""; my $output_string = ""; }

$input_string .= $_;

END {
    Perl::Tidy::perltidy(
        source      => \$input_string,
        destination => \$output_string
    );

    print "$output_string\n";
}

__END__