[Israel.pm] Selective warnings use

Shlomo Yona shlomo at cs.haifa.ac.il
Wed Feb 9 06:02:42 PST 2005


On Wed, 9 Feb 2005, Madani, Srikanth, VF-DE wrote:

> Direct use of the $] variable isn't possible because of different
> floating point implementations (as the documentation is kind enough to
> state.)

That's a bummer but not a real problem for you.
You can always check for the version using a regular
expression that will treat the contents of $] as a string.
And strings don't care about floating point arithmetics.

> A) Always use the "-w" switch.

If the only place you had 'use warnings' was somewhere in
the beginning of your script than using -w in your sh-bang
is going to have the same result. So in that case, it can be
the best solution.

-- 
Shlomo Yona
shlomo at cs.haifa.ac.il
http://cs.haifa.ac.il/~shlomo/



More information about the Perl mailing list