Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: text parsing question

by Dietz (Curate)
on Nov 07, 2004 at 14:52 UTC ( #405893=note: print w/ replies, xml ) Need Help??


in reply to text parsing question

Another solution (though not so elegant as NetWallah's):
$_ = ' ---------- ------------------------- -------- ---- ------ +------------------- ----- ---- ----------- -----------'; my $i; print $i += length $_, $/ for split /(?<=-)(?=\s+|$)/; __END__ __OUTPUT__ 13 40 50 56 83 90 96 109 122

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2016-06-26 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (330 votes). Check out past polls.