Forum Moderators: coopster & phranque

Message Too Old, No Replies

Using Strict

         

rugrat

8:29 pm on May 22, 2012 (gmt 0)

10+ Year Member



Got a question--no doubt an easy one. While using strict is a good thing for making sure all is well in a script(something I've learned how to do since coming to this site) I was wondering what about if the script was written using strict and then removed for the purpose of requiring other pages such a s .txt files. As long as the script was written in strict it should be okay, right?

phranque

9:29 pm on May 22, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



not that i've tried what you are proposing but:
why are you having a problem including any arbitrary file name?
is the require parameter (the filename) a bareword or is it quoted?

rocknbil

3:44 pm on May 23, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you should be able to include/require files using strict.

rugrat

10:42 pm on May 24, 2012 (gmt 0)

10+ Year Member



Actually I apologize for asking a (dumb)question I already knew the answer to as I tried it before and think I asked about it once. I was wanting to declare variable values on a speparate file. Sorry and thanx at the same time.

Brett_Tabke

12:12 pm on Jul 9, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I have been using Perl since about 96. I have never - nor will ever - use Strict. There is rarely a reason to ever do so and always better to code around it if you feel the need to use it. However, I don't don't do OOP programming for myself - as an ex-assem lang programmer, I believe in mainline subroutine coding and not to many external killing modules.