use strict refs not so strict? 
Author Message
 use strict refs not so strict?

I run 5.001e with Tk-b4's patch.1z, on HP-UX 9.03:
        > perl -v

This is perl, version 5.001

        Unofficial patchlevel 1e.

This fails, as it should:

        > perl -w
use strict;
sub A {print "in A\n"}
my $a="A";
&$a();          # Should fail and does
<EOF here>
Can't use string ("A") as a subroutine ref while "strict refs" in use at - line

But this works.  Why doesn't `strict refs? forbid it?

        > perl -w
use strict;
sub A {print "in A\n"}
my $a="A";
&$a("");        # Works!
<EOF here>
in A

Our newsfeed is slow and flaky so I'd prefer email (and will
summarize).  But I also follow this group as well as the feed permits.
Jim Stern -- These views are my own, not Northrop Grumman's.   (Hawthorne, CA)

Tue, 11 Nov 1997 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Aliasing refs while using strict

2. problem with scoping using strict no refs

3. problem with scoping using strict no refs

4. problem with strict refs while using GIFgraph

5. open EXPR, EXPR and strict 'refs'

6. How do I combine filehandles, refs and strict?

7. strings and symbol refs and strict - oh my!

8. help with no strict 'refs'

9. use strict "refs": # two questions

10. 'strict refs' and file handle variables

11. use strict sure isn't very strict

12. Strict not working.


Powered by phpBB® Forum Software