P
perlnewbie
Hi,
I got a Perl script from my colleague which I am going to run on my server.
This script is written to setup some folder structure and to create some users/group/permission/ownership. So, most part of the script uses backtick to call OS commands with some logic behind it. (my question is not about whether backtick is good or bad).
I want to make a minimum changes to the script so that every backtick with variable interpolation (example: `cd $v` should be recorded as 'cd /var/tmp', same as executed by OS) is recorded on STDOUT/STDERR or to some log file..
I don't want to go and add print statement just before every backticks.
What should be the good minimum change (either internal change or thru somewrapper) with or without any modules would help my scenario?
I am looking for a summary of chmod, chown, mkdir OS commands executed by this perl script.
Thanks.
I got a Perl script from my colleague which I am going to run on my server.
This script is written to setup some folder structure and to create some users/group/permission/ownership. So, most part of the script uses backtick to call OS commands with some logic behind it. (my question is not about whether backtick is good or bad).
I want to make a minimum changes to the script so that every backtick with variable interpolation (example: `cd $v` should be recorded as 'cd /var/tmp', same as executed by OS) is recorded on STDOUT/STDERR or to some log file..
I don't want to go and add print statement just before every backticks.
What should be the good minimum change (either internal change or thru somewrapper) with or without any modules would help my scenario?
I am looking for a summary of chmod, chown, mkdir OS commands executed by this perl script.
Thanks.