Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Obfu spoiler: vladb's sig (was Re: Deobfuscation for fun and profit)

by belden (Friar)
on May 27, 2002 at 23:49 UTC ( [id://169669]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $"=q;grep;;$,=q"grep";for(`find . -name ".saves*~"`){s;$/;;;/(.*-(\d+)
    +-.*)$/;
    $_=["ps -e -o pid | "," $2 | "," -v "," "];`@$_`?{print"+ $1"}:{print"
    +- $1"}&&`r
    m $1`;
    print$\;}
    
  2. or download this
    $"=q;
    
    ...
      `@$_` ? {print"+ $1"} : {print"- $1"} && `rm $1`;
      print $\;
    }
    
  3. or download this
     1:  $"=q;
     2:
    ...
     9:    `@$_` ? {print"+ $1"} : {print"- $1"} && `rm $1`;
    10:    print $\;
    11:  }
    
  4. or download this
    perl -e '@a = qw (a bc def); print "before: @a\n"; $"=q; print "after:
    + @a\n";'
    
    Output:
    before: a bc def
    
  5. or download this
    perl -MO=Deparse -e '@a = qw (a bc def); print "before: @a\n"; $"=q; p
    +rint
     "after: @a\n";'
    
    ...
    print "before: @a\n";             # yep, still with ya
    $" = ' print "after: @a\\n"';     # whoa, this is unexpected
    -e syntax OK                      # good news, I guess
    
  6. or download this
    $"=q;grep;;
    $,=q"grep";
    
  7. or download this
    $" = 'grep';
    $, = 'grep';
    
  8. or download this
     1:  $"= 'grep' ;
     2:  $,= 'grep' ;
    ...
     8:    `@$_` ? {print"+ $1"} : {print"- $1"} && `rm $1`;
     9:    print $\;
    10:  }
    
  9. or download this
         /               # start of pattern match
          (              # begin storing into $1
    ...
          )              # stop storing into $2
         $               # end of the line, bub
        /x;              # / to terminate regex, x to allow comments
    
  10. or download this
    @command = "ps -e -o pid | grep $2 | grep -v grep ";
    $ar_command = \@command;
    
  11. or download this
    perl -e '$foo = 0; $foo==0 ? print "foo is zero" : print "foo is non-z
    +ero";'
    
    Output:
    foo is zero
    
  12. or download this
    $foo = 0;
    if ( $foo == 0 ) {
    ...
    } else {
      print "foo is non-zero" ;
    }
    
  13. or download this
    if ( `@$_` ) {
      print "+ $1";
    } else {
      print "- $1" && `rm $1`;
    }
    
  14. or download this
    my $owner_is_still_running = `@$_`;             # search for a specifi
    +c $pid
    if ( $owner_is_still_running ) {
    ...
      print "removing $1";                          # didn't find $pid
      `rm $1`;                                      # remove $pid's tempfi
    +le
    }
    
  15. or download this
    #!/usr/bin/perl
    
    ...
          `rm $filename`;
       }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://169669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found