Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

PGA Golf, Round 1 - Results

by jmcnamara (Monsignor)
on Jun 01, 2001 at 02:14 UTC ( #84767=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
      sub hole{(pop=~/\w+/g)[4]} # 16
  2. or download this
    Can't find label TPC at -e line 5.
  3. or download this
      perl -e"die qq{Can't find label TPC at -e line 5.\n}"     # 53
      perl -e'#line 5' -e'goto TPC'                             # 29
      perl -e'#line 5' -egoto+TPC                               # 27
  4. or download this
    perl -e"
    goto TPC"
  5. or download this
       input       output
      'aaaaaa'     'a'
      'ababab'     'ab'
      'aabaab'     'aab'
      'ababaa'     ''
  6. or download this
      sub hole{pop=~/^(.+?)\1+$/;$1} #20
  7. or download this
      ('P', 'e', 'r', 'l', ' ', 'h', 'a', 'c', 'k', 'e', 'r')
  8. or download this
      sub hole{grep$_=$_&&chr hex,split/(..)/,pop}  # 34
      sub hole{(pack'H*',@_)=~/./g}                 # 19
      sub hole{$_=pack'H*',@_;/./g}                 # 19
  9. or download this
      sub hole{$m=pop;$m=($m,$_)[$m<$_]for@_;$m}    # 32
      sub hole{$m=pop;$_>$m&&($m=$_)for@_;$m}       # 29
      sub hole{$m=pop;$_>$m?$m=$_:1for@_;$m}        # 28
  10. or download this
       e.g.:     hole('dog', 'cat', 'fish', 'duck', 'lemur')
       returns:  ('cat', 'lemur', 'fish', 'dog', 'duck')
  11. or download this
      sub hole{map{$_->[0]}sort{$a->[1]cmp$b->[1]}map{[$_,m/[aeiou]/g]}@_}
    + # 58 
      sub hole{map{substr$_,1}sort map{/[aeiou]/;$&.$_}@_}          # 42
      sub hole{map/.(.+)/,sort map/[aeiou]/&&$&.$_,@_}              # 38

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://84767]
Approved by root
[shmem]: J.S.Bach said: "playing Clavier is darn easy. All you have to do is to push the right key with the right finger at the right time."
[shmem]: same for programming and creating bugs.
[choroba]: programming is easy once you know how to solve the problem

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-04-27 14:31 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (508 votes). Check out past polls.