use warnings; use strict; my $prev; while(<DATA>) { if (/;/) { chomp; $prev = $_; } else { s/(\d{5})/$1;/; print "$prev; $_"; } } __DATA__ Some Company; Some Street 52 12345 City1 Another Company; Another Street 63 23456 City2 Yet Another Company; New Street 11 34546 City3
In reply to Re: Regex with Newline
by toolic
in thread Regex with Newline
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |