Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

JAPH working in Perl and html

by westernflame (Sexton)
on Aug 01, 2005 at 22:49 UTC ( #480048=obfuscated: print w/replies, xml ) Need Help??

<html><!--$;; @a=<DATA>; $a[1]=~s/&#(.*?);/$1,/g; foreach $d(eval("(".$a[1].")")){print chr($d);} __DATA__ --> &#106;&#117;&#115;&#116;&#32;&#97;&#110;&#111;&#116;&#104;&#101;&#114; +&#32;&#80;&#101;&#114;&#108;&#32;&#104;&#97;&#99;&#107;&#101;&#114;

Replies are listed 'Best First'.
Re: JAPH working in Perl and html
by inman (Curate) on Aug 02, 2005 at 11:22 UTC
    Playing around with the idea a bit
    <html> <!-- $/;sub htm{@_[0]=~/#([0-9]+);(?{print+chr($1)})\n/;} htm <<'</html>' --> <body> &#106;&#117;&#115;&#116;&#032;&#097;&#110;&#111;&#116;&#104;&#101;&#11 +4;&#032;&#080;&#101;&#114;&#108;&#032;&#104;&#097;&#099;&#107;&#101;& +#114;&#044; </body> </html>
Re: JAPH working in Perl and html
by L33t1fy (Acolyte) on Aug 03, 2005 at 21:12 UTC
    Nice piece of code. I especially like the fact that it's bicompatible in HTML.


    Your Head Asplode

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://480048]
Approved by marto
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2018-06-18 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (109 votes). Check out past polls.

    Notices?