in reply to Re^2: Perl network programming
in thread Perl network programming
If so, the script could probably benefit from better error detection. If an IP address is required (as it seems to be) the code should validate that it has an IP address early on, and give a more informative error message.
Some tools for chasing down the problem:
Note that we putting $! in your error handling gives you the reason why the open failed, which may help you track down the problem.my $cfg_file = "/my/config/file"; open(my $fh, "<", $cfg_file) or die "can't read config file [$cfg_file] for reading: $!";
If you can try reducing your script to the minimum amount which reproduces the problem that would be useful. You'll also often find that doing that helps you find the problem yourself.
Good luck.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl network programming
by Viki@Stag (Sexton) on Oct 03, 2007 at 10:37 UTC |