403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/self/root/usr/share/doc/perltidy/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/usr/share/doc/perltidy/examples/ex_mp.pl
#!/usr/bin/perl -w

# example call to perltidy from man page documentation of Perl::Tidy

use strict;
use Perl::Tidy;

my $source_string = <<'EOT';
my$error=Perl::Tidy::perltidy(argv=>$argv,source=>\$source_string,
    destination=>\$dest_string,stderr=>\$stderr_string,
errorfile=>\$errorfile_string,);
EOT

my $dest_string;
my $stderr_string;
my $errorfile_string;
my $argv = "-npro";   # Ignore any .perltidyrc at this site
$argv .= " -pbp";     # Format according to perl best practices
$argv .= " -nst";     # Must turn off -st in case -pbp is specified
$argv .= " -se";      # -se appends the errorfile to stderr
## $argv .= " --spell-check";  # uncomment to trigger an error

print "<<RAW SOURCE>>\n$source_string\n";

my $error = Perl::Tidy::perltidy(
    argv        => $argv,
    source      => \$source_string,
    destination => \$dest_string,
    stderr      => \$stderr_string,
    errorfile   => \$errorfile_string,    # not used when -se flag is set
    ##phasers     => 'stun',                # uncomment to trigger an error
);

if ($error) {

    # serious error in input parameters, no tidied output
    print "<<STDERR>>\n$stderr_string\n";
    die "Exiting because of serious errors\n";
}

if ($dest_string)      { print "<<TIDIED SOURCE>>\n$dest_string\n" }
if ($stderr_string)    { print "<<STDERR>>\n$stderr_string\n" }
if ($errorfile_string) { print "<<.ERR file>>\n$errorfile_string\n" }

Youez - 2016 - github.com/yon3zu
LinuXploit