open(fd1,"log.txt") or die"unable to open"; open(fd2,">>log2.txt"); while($getVal=<fd1>) { if($getVal=~/name/) { $getVal="Designation :Manager\n".$getVal; } print fd2 $getVal; } close(fd1); close(fd2);
Edited by planetscape - added code tags
In reply to Re: How to append record at the existing record ?
by arunmep
in thread How to append record at the existing record ?
by bh_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |