So I'm trying to run 1 perl script multiple times but I am only able to run the first time while getting a permission denied message for the all other instances.
ERROR: (HTTP::Daemon: Permission denied) at script.pl line 50.
How do I fix this?
So I'm trying to run 1 perl script multiple times but I am only able to run the first time while getting a permission denied message for the all other instances.
ERROR: (HTTP::Daemon: Permission denied) at script.pl line 50.
How do I fix this?
From the looks of it, your script creates a web server that listens on a specific port. Only one socket can be bound to a port at a time, so the attempt to create the second one fails.
The solution is probably to avoid binding to a specific port.
LocalPort => ... from the arguments passed to HTTP::Daemon->new.$d->peerport().