Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

The golf course looks great, my swing feels good, I like my chances (Part VI)

by eyepopslikeamosquito (Canon)
on Dec 30, 2009 at 10:14 UTC ( #814900=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    print$"x(318%$_/9),(($_-$`)%12?o:x)&($_%12^$'/5?o:'}'),$/x($_/85)for u
    +npack<>!~/:/.C12,'XXXXXXXXXXXX'
    
  2. or download this
    $c[$_*=.52,5.5-4.7*cos][8+7.4*sin]=$`%12-$_?$_^$'/5?o:'m':$_^$'/5?h:x
    for<>!~/:/..11;print"@$_
    "for@c
    
  3. or download this
    $`%12-$_?$_^$'/5?o:'m':$_^$'/5?h:x
    
  4. or download this
    'ohxm'[-(i==m)^(i==h)]
    
  5. or download this
    'ohxm'[i==m::2][i==h]
    
  6. or download this
    "Dear $name"              # Perl and PHP
    "Dear %s" % expr          # Python and Ruby % printf-like operator
    ...
    "Dear #{expr}"            # Ruby string interpolation
    "Dear @{[expr]}"          # Perl "Baby Cart" string interpolation
    "Dear {expr}"             # Perl 6 version of Baby Cart (I think)
    
  7. or download this
    printf"%@{[.1*vec'XXXXXXXXXXXX',$_,8]}s",($_^$`%12?g:p)&($_^$'/5?g:u)|
    +"H
    
    "for map{$_,11-$_}<>!~/:/..5
    
  8. or download this
    "X" * 5               Python
    "X" * 5               Ruby
    "X" x 5               Perl
    str_repeat("X", 5)    PHP
    
  9. or download this
    5 * "X"    also produces "XXXXX" in Python! TMTOWTDI! :)
    5 * "X"    ... but not in Ruby (won't compile: type error)
    5 x "X"    ... or Perl (produces empty string)
    
  10. or download this
    $"x(318%$_/9)        Perl
    " "*(318%i/9)        Ruby
    318%i/9*" "          Python
    
  11. or download this
    r=raw_input()
    for c in'XXXXXXXXXXXX':i=ord(c);print~60495%i/4*" "+'hxmo'[(i%12==int(
    +r[3:])/5)^(i-int(r[:2]))%-12/42]+i/42*"\n",
    
  12. or download this
    r=raw_input()
    for c in'XXXXXXXXXXXX':i=ord(c);print~60495%i/4*" "+'ohxm'[-(i%12==int
    +(r[3:])/5)^1>>(i-int(r[:2]))%12]+i/42*"\n",
    
  13. or download this
    print~60495%i/4
    print 318%i/9
    
  14. or download this
    r=*$<;'XXXXXXXXXXXX'.each_byte{|i|$><<"%#{327%i/9}c"%'ohmx'[1>>(i-r.to
    +_i)%12^2&2<<i%12-r[3,2].to_i/5]+$/*(i/85)}
    
  15. or download this
    <?for($r=fgets(STDIN).~XXXXXXXXXXXX;11^printf(~X..1*ord($r[6+$h]).s,($
    +h^$r%12?g:p)&($h^"$r[3]$r[4]"/5?g:u)|~XXX);$h=12-$h-$d^=1);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://814900]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-07-08 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls