Hint: 'web' !~ /^[Pp]erl$/. That is you should specify which is the environment in which you're actually working... most probably CGI, isn't it? In particular there's something called "perlscript" which is a tool for client side perl scripting, but that is not much used AFAIK and my guess is that it is not what you're having to do with, so I think that your description of the problem may be misleading.
To obtain better help you should show what you have tried so far...