[ILUG] Silly perl question

Braun Brelin bbrelin at gmail.com
Thu Aug 28 10:52:16 IST 2008


Hello all,

I have a silly Perl question.  I'm running an Ubuntu Linux system (8.04),
with Perl 5.8.8.

However, the 'use strict' pragma seems not to be working.  I.e. I have the
following
Perl script:

#!/usr/bin/perl

use strict;

$a=10;

print "a = ",$a,"\n";

This should fail miserably with an error about not having $a declared, but,
unfortunately, it doesn't.  It just prints '10'.

This isn't my normal machine so I'm not sure how Perl was built, although I
suspect
that it isn't anything more than a standard install.  perl -V didn't really
give me any clues.  Anything stupidly obvious that I'm missing?

Thanks,

Braun



More information about the ILUG mailing list