thanks all
________________________________ From: Ajay Kumar <ajay.kum...@synopsys.com> To: Irfan Sayed <irfan_sayed2...@yahoo.com> Cc: "beginners@perl.org" <beginners@perl.org> Sent: Wednesday, June 17, 2009 3:42:41 PM Subject: RE: file handle in perl Hi Irfan You can do all four task like below 1: open FILE ,">filename.txt" or die$!; 2: my @lines=<FILE> 3: do changes through sed Like sed -e 's/original pattern/new pattern/p' filename 4:if you did changes it automatically get saved 5: close(FILE); Thanks Ajay -----Original Message----- From: Irfan Sayed [mailto:irfan_sayed2...@yahoo.com] Sent: Wednesday, June 17, 2009 2:42 PM To: beginners@perl.org Subject: file handle in perl Hi All, I am struggling with file handling in perl. i want to do following operation . 1: open the file 2: read the file 3: do the changes in specific lines 4: save the file 5: close the file i am not getting which operand i should use to do this operation . i tried all operands like >, >>, <, +<, +> please advice here is the line which i am using to open the file open (FILE, "+<", '.\Metrino\MonitoringSystem\Rtu\RtuInstallKit\EXFO RTU System\EXFO RTU System.vdproj') or die "Couldn't open for reading: $!\n"; plz plz advic regards Irf -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/