johny has asked for the wisdom of the Perl Monks concerning the following question:
Thanks in advance. JohnyContents of pp.txt is as below. asabast@xyz.com pxpx@xyz.com jxbx@xyz.com And the out put i want is asasbast\@xyz.com pxpx\@xyz.com jxbx\@xyz.com $file = "pp.txt" ; open (FH ,$file) || die ("could not openfile"); while (<FH>) { $_ =~ s/\s+$//; s/\@/\\@/; s/.com/.com /; $line = $_; print $line; } close (FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading mail ids from text file
by Skeeve (Parson) on Sep 18, 2007 at 06:07 UTC | |
|
Re: Reading mail ids from text file
by bruceb3 (Pilgrim) on Sep 18, 2007 at 06:18 UTC |