Currently I am fetching executable files from a web site.
I only fetch when part of the executable name is changed.
This has worked for the past year but now they changed the whole name.
So I wanted to add to my script a part to notify me if they changed
the whole name of the executable so I dont try and fetch some name that doesnt exist.
here is my current part of my script with the new name change:
my ($var) = $content =~ /(.{3}\-a99\-9)/;
$var = $1;
Now here is what I propose to add to my script so I am notified about
a complete new filename:
if (not defined $var)
{
print "The whole name was changed so no match found. You need to
+change your reg expression.\n";
exit 0; #Since no match then exit the script.
}
I want advise on if this is the correct way to handle this??
Also "exit 0" means good exit? Or do I use "exit 1"??