Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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:
here is my current part of my script with the new name change:
Now here is what I propose to add to my script so I am notified about a complete new filename:my ($var) = $content =~ /(.{3}\-a99\-9)/; $var = $1;
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"??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. }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Verifying data change
by adrianh (Chancellor) on Aug 15, 2002 at 21:22 UTC | |
by Arien (Pilgrim) on Aug 16, 2002 at 03:17 UTC |
Back to
Seekers of Perl Wisdom