Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Strict, strings and subroutines

by trantor (Chaplain)
on Oct 10, 2001 at 16:02 UTC ( #117976=note: print w/ replies, xml ) Need Help??

in reply to Strict, strings and subroutines

Well the error message says it all... however if you know what you're doing (and chances are you can do differently, e.g. through hashes or proper sub references, just do a Super Search):

#!/usr/bin/perl -w use strict; sub foobar { print "Here I am!\n"; } my $var = 'bar'; no strict "refs"; &{'foo'.$var};

You can lexically enable and disable strict as you need, always bearing in mind that you must know what you're doing...


Comment on Re: Strict, strings and subroutines
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://117976]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2015-11-27 21:16 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (732 votes), past polls