>
> When you say:
>
>     if ($add_alias) { ... }
>
> You are testing to see if $add_alias is true.  If $add_alias = 0, the block
> won't be executed.  0 may be a valid value for $add_alias to have.  If this
> is the case, you probably should be testing to make sure $add_alias is
> defined, meaning it has some value other than the special undef value.  You
> test for this using the defined operator, perldoc -f defined.
>

        thanks! currently i am having any form values that have a numeric
        value always set to 1 or greater. if i need a value of 0, i end
        up doing a $variable--
        i'll take a look at defined. thanks again.


>
>     open(FILE, $filename) || die("Unable to open filename \"$filename\": $!\n");
>
> What this means is that, if the file couldn't be opened, the script dies
> with an appropriate error message.  Review perldoc -f open, perldoc
> perlopentut, and perldoc perlvar (for $!).
>
>

        ah yes, i am familiar with this syntax, just not with the term
        you were using to refer to it. i havent included the || die
        statements since i have always been certain that the files existed
        but i suppose getting in good habit is the better goal here.
        thanks.

> The above descriptions of truth, definedness, and checking open should have
> been covered in your learning material.  You do have learning material, yes?
> If you don't, or if you do and it didn't cover these topics, consider
> purchasing _Learning Perl_ by Randal Schwartz, or _Beginning Perl_ by Simon
> Cozens.
>

        i own both actually. learning perl however was difficult for me
        since i came from a background in cisco routing rather than *any*
        sort of programming. the Cozens book it more my speed and the
        source of any code in my scripts.

        thanks again! -charles

Reply via email to