### (Ab)using fo(u)r...

by chargrill (Parson)
 on Feb 14, 2006 at 00:38 UTC Need Help??

This probably isn't a heavily obfuscated as others of its ilk (There can be only one!, My 2 cents worth) , and totally wasn't the original direction I was heading with this... but I saw myself writing for loops inside of for loops, and I just couldn't help myself.

```#!/usr/bin/perl

\$ four=44;\$                 fore=\$four*\$
fore ;for \$                 fore(1..\$ #4
four){\$ for                 ||(\$ \= pack
'c',\$ fore)                 } \$ fourteen
=14; \$ fjor                 =\$ four-\$ #4
fourteen ;\$                 f=1;\$ or=2;\$
Or=\$ f+\$or+                 \$ f+\$ or; #4
\$ foreteen=                 \$fourteen- \$
or;\$ fOr= \$                 four+\$four -
4 *2;\$ a= \$                 fior = sub {
return  [ \$                 fjor+\$four ,
--\$ four,-\$                 or,\$f,-\$ fOr
-4,\$ fOr -\$                 foreteen-\$ f
-\$ or]};\$b=                 \$ fore=sub {
return[ --\$                 fourteen,\$ f
,\$ or *\$ or                 + \$ f,-\$ #42
foreteen ,-                 \$ f- \$ or, \$
fourteen]};\$c=\$fyor=sub{return[-\$ fOr-\$ or,++\$four+4
,(\$f+\$Or)*(\$f+\$or),\$fourteen,-\$Or,-\$fOr+4]};\$d=\$foer
=sub{return[\$ fOr-4-4,-\$ Or-\$ f,\$ or,\$ or+\$ Or,-\$Or,
\$fourteen]};for(a..d){if(ref(\$\$_)=~m\$AR\$){for(\$\$_){\$
for=\$fourten
*\$fjor;\$fore
+=\$fjor;for(
@\$_){\$for.=\$
fore;\$foor+=
\$ _ ;\$ for.=
pack 'a' , \$
foor}}}else{
for(\$\$_){for
(@{&{\$_}}){\$
foor+=\$ _; \$
for.=pack'c'
,\$ foor} }}}
print \$  for

--chargrill
```\$/  =  q#(\w)#  ;  sub  sig { print scalar reverse  join  ' ',  @_  }
+ sig
map { s\$\\$/\\$/\$\\$2\\$1\$g && \$_ } split( ' ', ",erckha rlPe erthnoa stJu
+" );

Replies are listed 'Best First'.
Re: (Ab)using fo(u)r...
by jdalbec (Deacon) on Feb 14, 2006 at 03:34 UTC

Create A New User
Node Status?
node history
Node Type: obfuscated [id://529976]
Approved by McDarren
Front-paged by grinder
help
Chatterbox?
 [Corion]: marioroy: Heh, glad that you get enjoyment out of it! It's mainly a valve for me to vent some of the pressure ;-D [Corion]: Oooh - note is interesting, at least in the sense that I will steal its command line interface for my own note taking app ;-D

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2017-08-16 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
Who is your favorite scientist and why?

Results (265 votes). Check out past polls.

Notices?