|We don't bite newbies here... much|
regexp issue: Porting script from 5.6.1 to 5.005_02by vladb (Vicar)
|on Aug 10, 2004 at 01:00 UTC||Need Help??|
vladb has asked for the
wisdom of the Perl Monks concerning the following question:
Good monks, Once again I apologize for disturbing your heavenly peace ;-). I come to you with this question:
I wrote a cgi script to emulate SSI behaviour and it works fine for the latest versions of perl (5.6.1+). Now I'm having to port this script to run under perl 5.005_02. I know this one is outrageously old, but one particular server I have to run the cgi on doesn't run any better ;(.
The cgi in question is http://www.e-vris.com/ssi_cgi.txt (http://www.e-vris.com/ssi.tar.gz)
While porting, I ran into this one problem where a regular expression would return 1 (true) on an empty string, whereas in perl 5.6.1 it returns 0, as is expected. For example,
Any idea why the regexp operation evaluates to 1? There should be absolutely no match... Afterall, the query variable is undefined.
Your help is much appreciated ;-) Update: Gush... this was an obviously stupid question. Sorry for the trouble. I'll get on with porting (occassional brain farts are not pleasant, especially when exposed) ;-p
"I'm always right and I can prove it, because to the best of my knowledge, I've never been wrong."