#!/usr/bin/perl $muddy = "thedwayeislwhereuyousleftiitoallnthatiyousneedjtoudosistclea +rfyouredelusionsaandrfollowsyourapathninsidedyourlmindsiowneeyes"; #one line ($fear, $a, $is, $b, $no, $c, $reason, $d, $to, $e, $stop, $f, $taking +, $g, $the, $h, $steps, $i, $what, $j, $happens, $k, $happens_, $l, $ +keep, $m, $moving, $n, $without, $o, $thought, $p, $feel, $q, $everyt +hing, $r, $everyone, $s, $take, $t, $little, $u, $produce, $v, $good, + $w, $because, $x, $you, $y, $can, $z) = $muddy =~ /(\w{3})(\w)(\w{3} +)(\w)(\w\w)(\w)(\w{5})(\w)(\w{3})(\w)(\w{4})(\w)(\w\w)(\w)(\w{3})(\w) +(\w{4})(\w)(\w{3})(\w)(\w{4})(\w)(\w\w)(\w)(\w\w)(\w)(\w\w)(\w)(\w{5} +)(\w)(\w{4})(\w)(\w{9})(\w)(\w{3})(\w)(\w{6})(\w)(\w{4})(\w)(\w{4})(\ +w)(\w{6})(\w)(\w{4})(\w)(\w{5})(\w)(\w{3})(\w)(\w{3})(\w)/; $om = $a.$b.$c.$d.$e.$f.$g.$h; $ma = $i.$j; $ni = $k.$l.$m.$n; $pad = $o.$p.$q.$r.$s; $me = $t.$u.$v; $hum = $w.$x.$y.$z; print "\n\n\t\t\t$om"; print " $ma"; print " $ni"; sleep(1); print " $pad"; print " $me"; sleep(1); print " $hum\n\n\n\n"; sleep(3); print "$fear $is $no $reason $to $stop $taking\n"; sleep (2); print "$the $steps $what $happens $happens_\n"; print "$keep\n"; sleep (2); print "$moving $without $thought\n"; print "\n"; sleep (1); print "\t\t$feel\n"; print "\n"; sleep (2); print " $everything $everyone\n"; sleep (2); print "\t$take $little\n"; sleep (2); print " $produce $good $because $you $can\n\n"; sleep (7);
Note: for this to work correctly you need to have all the lines with \w combined onto one line, however to make it display on our site nicely I split that line up. vroom

05/15/01 Update: This was my first perl script,and first programming done period in any language.
So when I made this I didn't understand what damian1301 meant about using \w{3}.

Since then I've grown and learned thanks to Perlmonks.
I hope to have another poem ready soon.

Replies are listed 'Best First'.
RE: dream within the dream
by providencia (Pilgrim) on Apr 04, 2000 at 20:48 UTC
    Not to be pretentious but here's my explanation.
    Be gentle I'm a newbie to perl and programming in general.

    My perl program/poem (the dream within).

    The first section is supposed to be confusing too look at.
    Then there is a chant (to the buddha of compassion Avalokiteshvara) that
    prints a one line poem. (26 characters long 6 words)

    The second one is the variables (the $fear words)(it is 26 words long 6
    lines). The third is printed on the screen when the program is run (also
    26 words 6 lines).

    The embedded poem is 132 characters in length.
    The printed poem is 98 characters in length.
    The total characters in both are 230.
    2 divided by 3 is .6666666666666666666666666(infinitum).

    23 is the number in this poem for those of you familiar with the
    Illuminati trilogy.
RE: dream within the dream
by mcwee (Pilgrim) on May 18, 2000 at 03:01 UTC
    Bravo! This poem has a really wonderful degree of complexity; I'm super impressed. It DEFINTIELY deserves more points than it has recieved. I heartily encourage you to write (and post) more pieces like this.

    The Autonomic Pilot

Re: dream within the dream
by damian1301 (Curate) on Dec 29, 2000 at 03:45 UTC
    You could have shortened this significantly if you used \w{3} Instead of \w\w\w. OTher than that I love it and it's on my favorite nodes

    Wanna be perl hacker.
    Dave AKA damian
Re: dream within the dream
by extremely (Priest) on Dec 29, 2000 at 04:03 UTC
    Q. Can't you just stick an "x" at the end of the regexp and get it to work with short lines?

    A. yes.

    --
    $you = new YOU;
    honk() if $you->love(perl)