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#!/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);
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 | |
|
RE: dream within the dream
by mcwee (Pilgrim) on May 18, 2000 at 03:01 UTC | |
|
Re: dream within the dream
by damian1301 (Curate) on Dec 29, 2000 at 03:45 UTC | |
|
Re: dream within the dream
by extremely (Priest) on Dec 29, 2000 at 04:03 UTC |