Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: golf anyone? (taking first field)

by busunsl (Vicar)
on Jan 07, 2003 at 07:33 UTC ( #224893=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @list = (
      "123 : oain:b:okfbd",
    ...
    $, = "\n";
    
    print map{/(.*?)(\s*:|\s*$)/;$1||()}@list;
    
  2. or download this
    map{s/\s*:.*|\s*$//;$_||()}@list;
    
  3. or download this
    map{s/\s*(:.*|$)//;$_||()}@list;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://224893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2020-10-19 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (205 votes). Check out past polls.

    Notices?