Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Splitting Data

by flounder99 (Friar)
on Dec 08, 2003 at 20:39 UTC ( [id://313224]=note: print w/replies, xml ) Need Help??


in reply to Re: Splitting Data
in thread Splitting Data

This is a good candidate for a one liner.
$ cat temp.txt | perl -ne 'print "$_\n" for /\[\d+\]\s*=\s*\d+/g' [0] = 1 [1] = 2 [2] = 3 [3] = 4 [4] = 5 [5] = 6 [6] = 7 [7] = 8 [8] = 9 [9] = 10 [10] = 1 [11] = 2 [12] = 3 [13] = 4 [14] = 5 [15] = 6 [16] = 7 [17] = 8 [18] = 9 [19] = 10

--

flounder

Replies are listed 'Best First'.
Re: Splitting Data
by b10m (Vicar) on Dec 08, 2003 at 20:57 UTC
      but but but, I think it's cleaner / nicer / not that much of a waste / my privelege to waste processes!

      --

      flounder

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (None)
    As of 2024-04-25 01:31 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found