I've been working with variations on my signature, and came up with this:
#!/usr/bin/perl
open s,">/etc/services";$#=$/;seek s,"m/^ftp/";print s"ssh\t22\tudp",+
+0;$_=(<0>
)[-1];$/=q*(\w)*;*#=*_;$#=~s*^.\*?"(.+)".\*$*$1*;sub sig{print~~revers
+e join' '
,@#}sig map{s$\$/\$/$\$2\$1$g&&$#}split(' ',$#);$#=",erckha rlPe erthn
+oa stJu";
This uses an adaptation of a trick I've learned from japhy for part of it, the other part is a much older trick. Bonus ++ to anyone who recognizes my other source of inspiration :).
Update: BTW, this WILL work on windows, and ...
No, I don't clobber/write/edit any files on any other platform
perl -MO=Deparse filename.pl should allay your fears, along with japhy's Obfuscation Review - but that takes out some of the fun
--chargrill
[signature hidden for this post]
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.