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

/^[a-z ]*$/

by Roger_B (Scribe)
on Sep 29, 2005 at 14:54 UTC ( [id://496129]=obfuscated: print w/replies, xml ) Need Help??

Since everyone seems lots of people seem to fill their JAPHs with non-alpha characters, I thought I would go the other way and write my first JAPH with a-z and ' ' only!

#! /usr/bin/perl -l use warnings; use strict; s cm cjump s or hide s it eq phcxg cmp s oin ocker oxsio or s jm pjstjxis ne s k s or k anotk or s s eq ps s lt s qit qerl qog or s wide s wq qer pqwe eq print and last for eval q s caller s

OK its not rocket-science, and I cheated by using -l but it's fun!

updated - thanks to cog for pointing out a JAPH going further and using keywords only! Nice work blokhead. (And I'm sure there are others with a newline and no warnings too.)

update2 - OK it's so obvious how to avoid the -l I feel mildly stupid! At least I worked it out myself (not the method suggested by ambrus either!). Modified JAPH:

#! /usr/bin/perl use warnings; use strict; s cm cjump s or hide s it eq phcxg cmp s oin ocker oxsio or s jm pjstjxis ne s k s or k anotk or s seq ps s lt s qit qerl qog or s wide s wq qer pqwe eq print and last for eval q s caller s

Replies are listed 'Best First'.
Re: /^[a-z ]*$/
by blokhead (Monsignor) on Sep 29, 2005 at 15:26 UTC
    FYI, the code from the wikipedia article is my JAPH, originally posted at Fun With Reserved Keywords (And no, I didn't add it to the wikipedia article). There is also a link in that node to code that generates JAPHs of this form.

    I recently had an idea for another approach to the keywords-only JAPH (incidentally which was also inspired by Ode for getprotobyname), which is more time-consuming to make. Right now I only have a sig-version of it (it's been at the bottom of my homenode for a while)..

    perl -le 'chop gt print if s qq socket y qx cmp s q qq or uc tr qw s my not vec eq abs do le chop q'
    A full "Just another perl hacker" output is probably not possible with this method, at least without some extreme cleverness..

    blokhead

      I actually tried finding out who was the original author of that JAPH before posting, but neither Wikipedia nor Google were much help...

      ++ for you :-)

Re: /^[a-z ]*$/
by ambrus (Abbot) on Sep 29, 2005 at 15:26 UTC
Re: /^[a-z ]*$/
by cog (Parson) on Sep 29, 2005 at 15:00 UTC
    everyone seems to fill their JAPHs with non-alpha characters

    Not everyone. Search for "uses only Perl keywords" on that link.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-03-28 11:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found