in reply to Invalid sub ignored on use strict;
Here are some examples on what passes strict and not:
So what has happened is that your solid code has not ever been evaluated to false... yet. ;-)#!/usr/bin/perl -w use strict; # With a subroutine defined: foo(); # Prints "Stuff" &foo; # This too. foo; # Blows up, no such sub... yet. sub foo { print "Stuff\n"; } foo; # Is also ok, prints "Stuff" # With no subroutine defined: bar(); # Compiles, blows up at runtime *if* executed &bar; # This one too bar; # Blows up at compile time
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(wil) Re: Invalid sub ignored on use strict;
by wil (Priest) on Apr 30, 2002 at 14:23 UTC |