Aug 25, 2010, 10:24 PM
Post #1 of 3
Extracting data from file and modifying without changing actual file
I am working on a project in which i have to work on txt file and want to edit few things like tables in it and save as new file.
I am saving whole data in a variable (scalar)
from it i am extracting table with regex and because of which my original data is getting modified.
To extract table i am using
$wholefile=~s/(pattern for table)/sub($&)/segx;
I want to save table in different scalar without modifying $wholefile, can anybody please tell me how to do it?
(This post was edited by tej.87g on Aug 26, 2010, 12:18 AM)