in reply to Re: typojaph
in thread typojaph
#pause for $_[0] seconds (other elements undef) sub'_{select$_[3],$_[2],$_[1],$_[0]} #makes the eyes and nose ($: = ':-') $: = ?y? ? y::: : q;:;; $: .= qq:-:; #makes the different mouths @% = map { $: . $_ } qw: ) ) ( / o P P :; #where everything happens #look below this sub for a few initializations sub'__{ @_ = $c->(@:); while($_ = pop){ unless($*){ $*=length; #this pauses for 1 second ($| == 1) if the next #word is all spaces (unless the last word was #longer than 7 characters [there's only one]) or #shifts the next smiley into $. if(m+^$"*$+i){ _$| if(length $& < $-) } else { $. = shift@% } } #this "erases" the last word when the current word #is all spaces (@| stores the chars of the whole string) #since $, == ' ' if(/ /){ pop@| for(length..++$*); push@|, $, for(length..--$*) } print+chr$:; #chr$: == "\r" push@|,chop; #push next char print for@|; #and print the whole string #change to a wink if the tongue is out substr($.,0,1) = q$;$ if $. =~ /P/; #print spaces and the smiley and a few more spaces print $" x (27-@|) . $. . $" x 5; _$= / 1.e3; #pause for 0.06 seconds length&&redo; #begin the while again if there #are more characters in this word $* *= length; #$* = 0 #adds exactly one space after each word @|=(split($\, join $",split /\s/, join+q,, ,@|), $, = $"); next if @_ } } #converts the hex values below to chars #$! better be undef $c = sub{ map { join $!, map {chr hex} /../g } @_ }; ++$|; $: = 2 * @% - $|; #$: = 13 $- = 47 % $:; #$- = 9 #the strings in hex @: = qw; 2c72656b636168 6c726550 2020202020202020 61426c6175736956 2020202020 4c4f424f43 20202020 6176614a 726568746f6e61 7473754a ;; __; #do the stuff print+chr@: #print a newline
|
|---|