May 23, 2012, 12:02 AM
Post #6 of 13
Re: [gerble1000] can somebody help with this small scripts please
[In reply to]
whilst still checking to see if the file exists
You are doing this implicitly, when fetching the code number from the file. I would create a sub which can be called as
which returns the code number if the file exists, returns the empty string if the file exists but does not contain a valid code number, and returns undef if the file does not exist.
It's up to you what you do if the file exists but can't be opened for reading. One solution would be to also return undef if this case, but of course more clever alternatives are possible.
if not "last" break out
What does this mean? Sorry, I don't understand the (English) meaning of the sentence.