Per your data set as it stands just now, here is an SSCCE:
use strict; use warnings; use Test::More tests => 1; my @have = ( '99~Arun~Kumar~Mobilenum: 1234-567 , from Earth Human', '98~Mahesh~Babu~Mobilenum: 5678-901 , from Earth Human' ); my @want = ( '99~Arun~Kumar~Mobilenum: 1234-567 , from Earth Human', '98~Mahesh~Babu~Mobilenum: 5678-901 , from Earth Human' ); for (@have) { s/\n/ /sg; } is_deeply (\@have, \@want);
Since you haven't said what your input record separator is I have created the array by hand. See also How to ask better questions using Test::More and sample data.
In reply to Re: perl regex to match newline followed by number and text
by hippo
in thread perl regex to match newline followed by number and text
by arunkumarzz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |