Tandem said:
I have few function calls that has to be changed to the new one in the
whole source files ,present in a single directory. Please let me know
if any such tools available.
In general you will need a fully-fledged parser for your particular
programming language in order to parse the source code of that programming
language. Otherwise you are running the risk that in addition to the desired
function calls other text pieces may be changed, too, if they happen to have
or contain the same character sequence (e.g. in a string or as part of the
name of some other function) .
If you think in your particular situation you can accept that risk then
please have a look at
- "perldoc -f glob" or "perldoc -f readdir" about how to get the names
of all files in a directory
- "perldoc perlop" for information about the "s" operator
("substitute"); maybe "perldoc perlre" for information about regular
expressions
- and "perldoc -q change" for the FAQ entry about "How do I change one
line in a file[...]?"
jue