Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Unbalanced, Introspective Japh

by liverpole (Monsignor)
on Jul 01, 2006 at 01:41 UTC ( [id://558718]=obfuscated: print w/replies, xml ) Need Help??

"Unbalanced" because of the unmatched parentheses, braces, and brackets.  "Introspective" because ... well, you'll have to figure that out for yourself.

This works with Perl version 5.8.6 (in Linux), and 5.8.7 (in Windows), and possibly with other versions of Perl (though I can't be sure).

My apologies if this has been done before (and please let me know if so).  I came up with the idea just this evening, but one can never be sure whether or not similar prior art exists.

( $ ||= open$ ) ,$ ^X) ;; X :; { $ ;+= print if ($_ = lc getc $)) eq# } ( split$ ,,q#- just another perl hacker# ) [ $ ;]; eof$ ( ?die$ /: redo } 060630# ]

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re: Unbalanced, Introspective Japh
by Hue-Bond (Priest) on Jul 01, 2006 at 06:24 UTC
      That's very interesting, and it's different from my system, where there's only a brief, almost undiscernable pause while printing "just", and the program ends immediately after printing the final word.  I'm guessing it's either because I have a faster processor or a different version of Perl.

      It was intentional that I didn't implement any tests which were more likely to depend on the specific version of Perl running, as that might have needlessly broken the program for other versions of Perl.  Which version of Perl *are* you running, by the way?


      s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
Re: Unbalanced, Introspective Japh
by jdalbec (Deacon) on Jul 01, 2006 at 20:55 UTC
    This is perl, v5.8.6 built for darwin-thread-multi-2level

    Mac OS X 10.4.7 PPC

    It works if I give the full path to Perl, but not if I just type "perl".

    Update: I get -(pause) ju(pause)st an(pause)other perl hacker(pause). Timings (733 MHz G4; /usr/bin/perl is 19280 bytes):

    real 0m2.349s user 0m1.865s sys 0m0.207s
    It seems that on my system the bulk of /usr/bin/perl has been separated out into /System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE/libperl.dylib (1086420 bytes).

    perldoc perlvar says:
    Depending on the host operating system, the value of $^X may be a relative or absolute pathname of the perl program file, or may be the string used to invoke perl but not the pathname of the perl program file.
    and
    It is not safe to use the value of $^X as a path name of a file, as some operating systems that have a mandatory suffix on executable files do not require use of the suffix when invoking a command.
Re: Unbalanced, Introspective Japh
by wulvrine (Friar) on Jul 05, 2006 at 11:15 UTC
    Great job as always! I had no idea you could do some of the things in here. You just make it look too easy (*humbled look*)

    s&&VALKYRIE &&& print $_^q|!4 =+;' *|
Re: Unbalanced, Introspective Japh
by starbolin (Hermit) on Jul 16, 2006 at 18:40 UTC

    Sorry for the late post. Does't do anything on either of my systems. Prints a single blank line on v5.8.6 openBSD v3.8 i386 and a single hyphen on v5.8.5 FreeBSD v5.3 i386. I'l look into why later tonight.


    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-18 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found