> -----Original Message-----
> From: Brent Clark [mailto:[EMAIL PROTECTED]
> Sent: Friday, August 19, 2005 3:40 AM
> To: Beginners Perl
> Subject: not using strict problems
> 
> Hi list
> 
> I have a problem whereby another new programmer (like myself) likes
NOT to
> use strict in his code where by I do.

My own anecdote:  I didn't think that using the 'strict' or 'warnings'
pragmas was important either, once.  And I'm a very novice programmer.
However, when I thought about, I always liked being able to debug my
(shell) scripts as I wrote them; it saves time by testing during, not
after coding.  Using those pragmas has helped me a lot since I started
with Perl.  More importantly it has forced me to become a better
programmer, to pay attention to scoping.

> 
> The problem is that I have is that he as writting a pm file and
basically
> just did is as so:
> 
> use pm file
> 
> &somename;
> 
> 
> sub somename {
>       $var1 = $linex[0];
>       $var2 = $linex[1];
> 
>       and the list goes on.
> }
> 
> But now I have to use that pm file but and because i use strict,  perl
> basically just spits out
> 
> Global symbol "$roomCode" requires explicit package name at C:/Program
> Files/Apache Group/Apache2/cgi-bin/updatePropDatFile.pl line 103.
> 
> so my question is, is there any way I can use local or something to
stop
> strict from moaning about this varibles.

Since you are going to be working _with_ this new programmer, it is
probably a good idea that you agree on how you are going to code (use
scoping, variable name conventions, etc.), especially if you are sharing
code.  In most places in general, and this list in particular, you are
going to find that perlers will suggest, nay, implore you to be strict.

Send your coworker here:

http://perl.plover.com/FAQs/Namespaces.html

And have him learn to program properly.

ry

"Any job that is worth doing is worth doing right, the first time"
        -Grandpap

> 
> Any tips etc would greatfully be appreciated.
> 
> Kind Regards
> Brent Clark
> 
> 
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
> 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to