in reply to How can I replace the pattern in the 6 th field?
#!/usr/bin/perl use warnings; use strict; while (<DATA>) { my $c = 0; s/([()])/$c++ > 1 ? "" : $1/ge; print } __DATA__ Jun 12 09 mail (sender@sender.com) - (recip1@domain.com) 0.075 9387 Jun 12 10 mail (sender@sender.com) - (recip1@domain.com),(recip2@domai +n.com) -1.889 25623
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I replace the pattern in the 6 th field?
by theravadamonk (Scribe) on Jun 18, 2018 at 16:06 UTC | |
by choroba (Cardinal) on Jun 18, 2018 at 16:11 UTC | |
by theravadamonk (Scribe) on Jun 19, 2018 at 04:07 UTC | |
by AnomalousMonk (Archbishop) on Jun 18, 2018 at 16:52 UTC | |
by Laurent_R (Canon) on Jun 18, 2018 at 19:34 UTC | |
by AnomalousMonk (Archbishop) on Jun 18, 2018 at 20:22 UTC | |
by Laurent_R (Canon) on Jun 18, 2018 at 21:11 UTC | |
by AnomalousMonk (Archbishop) on Jun 18, 2018 at 21:38 UTC | |
|