I am new to perl scripting. Need your suggestion for the same
I have a xyz.pl script which runs to success or failure. If it fails, I need to save the checkpoint where it failed e.g. the failure name in a variable
$var=job[0];
When I rerun xyz.pl for the second time, it should read this variable $var and picks its value and start from job where it failed and not from the beginning.
In perl, is it possible? Is there variable which can retain the value for the above scenario for consecutive runs of the script.
Please advise.
A variable cannot survive the end of a script. However, you can save the value into a file from which you can later read it back into another run of the script.