Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

PGA Golf, Round 1

by jmcnamara (Monsignor)
on May 24, 2001 at 16:51 UTC ( #82878=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
        sub hole{print "hello, world"}    For a sub 
                 123456789_123456789_     20 chars
        perl -e 'print "hello, world"'    For a one liner
        123456789_123456789_123456789_    30  chars
  2. or download this
    Can't find label TPC at -e line 5.
  3. or download this
       input       output
      'aaaaaa'     'a'
      'ababab'     'ab'
      'aabaab'     'aab'
      'ababaa'     ''
  4. or download this
      ('P', 'e', 'r', 'l', ' ', 'h', 'a', 'c', 'k', 'e', 'r')
  5. or download this
       e.g.:     hole('dog', 'cat', 'fish', 'duck', 'lemur')
       returns:  ('cat', 'lemur', 'fish', 'dog', 'duck')

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://82878]
Approved by root
[choroba]: The documentation just says the second argument should be "characters"
[Eily]: It can also be used to force a copy, and remove magic from a variable
[Eily]: there was a post some time ago about variable coming from regex taking more space than the same string defined directly IIRC

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-02-22 17:14 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (295 votes). Check out past polls.