Welcome to WebmasterWorld Guest from 54.196.144.242

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Using Strict

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

New User

joined:Feb 16, 2012
posts: 7
votes: 0


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?
9:29 pm on May 22, 2012 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10563
votes: 15


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?
3:44 pm on May 23, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


Yes, you should be able to include/require files using strict.
10:42 pm on May 24, 2012 (gmt 0)

New User

joined:Feb 16, 2012
posts: 7
votes: 0


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.
12:12 pm on July 9, 2012 (gmt 0)

Administrator from US 

WebmasterWorld Administrator brett_tabke is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 21, 1999
posts:38063
votes: 13


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.