ollowing example uses string references to hold the input and output code and error streams, and illustrates checking for errors.</p>

<pre><code>  use Perl::Tidy;

  my $source_string = &lt;&lt;&#39;EOT&#39;;
  my$error=Perl::Tidy::perltidy(argv=&gt;$argv,source=&gt;\$source_string,
    destination=&gt;\$dest_string,stderr=&gt;\$stderr_string,
  errorfile=&gt;\$errorfile_string,);
  EOT

  my $dest_string;
  my $stderr_string;
  my $errorfile_string;
  my $argv = &quot;-npro&quot;;   # Ignore any .perltidy