Your descriptions of what the problem is are rather unclear.
it doesn't work somehow
the .cgi still doesn't work
Without knowing what problems you're seeing, it's hard to know what the problem is. But I tried copying your code and running the program from the command line and I got this error message:
Can't locate mysubs.lib in @INC (@INC contains: ...)
So I think you are using a recent version of Perl and are running up against this change:
Removal of the current directory (".") from @INC
The perl binary includes a default set of paths in @INC. Historically it has also included the current directory (".") as the final entry, unless run with taint mode enabled (perl -T). While convenient, this has security implications: for example, where a script attempts to load an optional module when its current directory is untrusted (such as /tmp), it could load and execute code from under that directory.
Starting with v5.26, "." is always removed by default, not just under tainting. This has major implications for installing modules and executing scripts.
If this is the problem, then you can fix it by adding the script's directory to @INC
as follows:
use FindBin qw( $RealBin );
use lib $RealBin;
before your call to require
. If that doesn't solve your problem, perhaps you would consider sharing a little more detail about the problems that you are experiencing.