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

Re: pipe delimited file problem

by imp (Priest)
on Jan 22, 2007 at 02:27 UTC ( #595839=note: print w/ replies, xml ) Need Help??


in reply to pipe delimited file problem

You can use a zero-width positive look behind, like this:

use strict; use strict; while (<DATA>) { s/(?<=\|)\|/empty|/g; print; } __DATA__ |a||| |||| |||a|
I usually find it easier to maintain code that uses split though.


Comment on Re: pipe delimited file problem
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://595839]
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: (6)
As of 2014-07-26 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (177 votes), past polls