Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by belden (Friar)
on May 27, 2002 at 23:49 UTC ( #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
Node Status?
node history
Node Type: note [id://169669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (11)
As of 2015-07-07 09:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls