Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Ghost in the machine.

by jmcnamara (Monsignor)
on Feb 01, 2002 at 09:36 UTC ( [id://142643]=obfuscated: print w/replies, xml ) Need Help??


     perl -MCPAN -e 'install jmcnamara & _ x ord $ ;'  | tail -1

--
John.

Replies are listed 'Best First'.
Re: Ghost in the machine.
by jmcnamara (Monsignor) on Feb 01, 2002 at 14:46 UTC

    For those who don't have CPAN configured, here is the output:
    Don't be silly, you can't install John McNamara ;-)

    --
    John.

Re: Ghost in the machine.
by BazB (Priest) on Feb 02, 2002 at 14:58 UTC

    Could you explain how this is possible?

    I've grepped through CPAN/*.pm, but I've failed to find any relevant code.


      This is more artifice than obfuscation.

      The "& _ x ord $ ;" code is used to convert my lowercase PerlMonks ID jmcnamara to my uppercase CPAN directory JMCNAMARA. I could have used uc but I thought that I should put in a little effort. ;-)

      # The following are equivalent perl -MCPAN -e 'install jmcnamara & _ x ord $ ;' perl -MCPAN -e 'install "jmcnamara" & ( "_" x ord($;) )' perl -MCPAN -e 'install "jmcnamara" & ( "_" x 28 )' # With bitwise string "&" the longer string is truncated # to the length of the shorter string. Therefore: perl -MCPAN -e 'install "jmcnamara" & ( "_" x 9 )' perl -MCPAN -e 'install "jmcnamara" & "_________"' perl -MCPAN -e 'install JMCNAMARA'

      Running this will cause CPAN to generate an error because you are trying to install a directory instead of module (or bundle). This helpfully translates my PerlMonks name into my real name. Here is the output as seen through tail -l.     Don't be silly, you can't install John McNamara ;-)

      This error message is buried in CPAN.pm.

      --
      John.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-26 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found