in reply to Re: Problem with using XBase
in thread Problem with using XBase

Thank you..It works splendidly now. What is the "use strict" you referred to? I am very grateful for your assistance. Sincerely, Todd

Replies are listed 'Best First'.
Re: (3) Problem with using XBase
by VSarkiss (Monsignor) on Jan 25, 2002 at 04:11 UTC

    You're welcome. The use strict I referred to brings in the strict Perl module (technically, it's a pragma) into your program, which restricts it from doing certain things. You can read about it here or here.

    In a (very simplified) nutshell, it does three things:

    1. It disallows using variables which haven't been declared in some fashion, such as with my, our, use vars, etc. This would've caught your upper/lower case problem since there was no declaration for $LASTNAME.
    2. It generates an error if you use a bareword (i.e., an identifier with no type symbol like $, @, and %).
    3. It prevents you from using symbolic references. That's a bit of an advanced topic; at this stage you should just avoid them unquestioningly. ;-)
    It's the collective wisdom of the Perl community that any script longer than a few lines should always begin with use strict. I heartily agree.