What am I doing wrong when using "use strict" ?

E

ed

Folks,

I'm attempting to write some OOP with the use strict pragma on an I'm just
not getting it to work. Here's an example

#!/usr/bin/perl -w
use strict;
use Automobile;
my $file = new Automobile;

I keep getting the error:
Bareword "Automobile" not allowed while "strict subs" in use.

The script runs fine without the use strict, so their must be something I
haven't figured out yet.

Thanks in advance!!

Ed
 
N

nobull

ed said:
#!/usr/bin/perl -w
use strict;
use Automobile;
my $file = new Automobile;

I keep getting the error:
Bareword "Automobile" not allowed while "strict subs" in use.

Not from that code I think.

Please post genuine code that generates the error (see posting guidelines).

This news group does not exist (see FAQ). Please do not start threads here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top