What do you mean by "hardcoded variables"? Can you give us an example?
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |
Im sorry , i guess my question was ambiguous.
What im trying to do is replace all the hardcoded material with variables.
egs :
my $_out = `tcpreplay -i eth0 pkt_dump`;
i want to re-wrtie it as :
my $_cmd = "tcpreplay -i eth0 " ;
my $_out = `$_cmd pkt_dump`;
In effect , i want to replace all the hardcodes with variables in a lot many places.
| [reply] |
If all your hardcoded data is coming from an external program, then you can just search for the back-quotes. You can even write a Perl-program to do so and (if all hardcoded material follows the same format) replace it by your variables.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] |