Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Data type validation using regular expressions

by liverpole (Monsignor)
on May 27, 2007 at 22:27 UTC ( [id://617775]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Data type validation using regular expressions
in thread Data type validation using regular expressions

Maybe it's just me; I feel like it's more explicit when I see it together with strict, spelled out:
use strict; use warnings;

But I confess that I still don't trust -w on Windows (even though I now know it works perfectly well), because Windows ignores the first part of the shebang line.  To test this, you can do:

#!/usr/path/which/does/not/exist/perl

and it'll still run Perl correctly.  Granted this isn't a reason to stop using -w, which still does work as I mentioned, but it did make me suspicious of the whole top line for quite a while.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^4: Data type validation using regular expressions
by naikonta (Curate) on May 28, 2007 at 02:03 UTC
    Don't get me wrong :-) I always use warnings ever since I knew it instead of -w switch. Being a pragma gives it more power and flexibilities. I don't use Windows but I knew from the start that shebang doesn't work on it, althought Apache seems to honor the switches. However, one should take advantage of the pl2bat converter to keep his/her original switches attached to the shebang.

    Still, whenever I see -w with the shebang I won't bother to change it to use warnings; or recommend to do so (unless one needs more control on warnings), it's still equally explicit, and still perfect for me (with use strict; of course) :-)


    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://617775]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 05:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found