in reply to Re^2: IP address validation when IP is picked dynamically
in thread IP address validation when IP is picked dynamically

Be aware that the script as written will only work correctly if it's in the same directory as the files to be processed.

When using opendir/readdir only the file names are being returned, not the full path. If the script is in some other directory, then your open call will fail because it lacks the required path to the file and will die at that point without ever parsing any files.

You should either include $directory in the open call, or add it to $file prior to the open call, or use the glob function to retrieve the file list.

  • Comment on Re^3: IP address validation when IP is picked dynamically

Replies are listed 'Best First'.
Re^4: IP address validation when IP is picked dynamically
by rahulruns (Scribe) on May 26, 2015 at 04:14 UTC

    Thank you for your pick of information I have made those changes (replying late, know that but Script has been enhanced further. Thank you all for your support. We can close this thread