Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Win32::OLE and Excel Question/Help

by kcott (Archbishop)
on Feb 13, 2013 at 09:12 UTC ( [id://1018507]=note: print w/replies, xml ) Need Help??


in reply to Win32::OLE and Excel Question/Help

G'day mmittiga17,

Here's another way to do it:

#!/usr/bin/env perl use 5.010; use strict; use warnings; local $/ = 'CUSIP'; while (<DATA>) { s{\s*$/$}{}m; next unless $_; s{\n}{ }gm; s{\s*$}{}; say $/, $_; } __DATA__ CUSIP data data data data data data data data data data data CUSIP data data data data data data data data data data data CUSIP data data data data data data data data data data data

Output:

$ pm_merge_multiline_with_leader.pl CUSIP data data data data data data data data data data data CUSIP data data data data data data data data data data data CUSIP data data data data data data data data data data data

-- Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-24 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found