in reply to Logical AND

Please to show us the code that sets $freq. Given the code here if it is 'FREE' and @size>=1 then both print statements should be output. So your assertion that $freq is actually 'FREE' is doubtful. Incidentally a more idomatic and easily readable way to write the above code is:
print "Size array is not empty\n" if @size; print "The frequency is FREE!\n" if @size && $freq eq 'FREE';
or if you intend to have more than one statement executed in the ifs
if (@size) { #statements } if (@size && $freq eq 'FREE') { #statements }
HTH

--- demerphq
my friends call me, usually because I'm late....

Replies are listed 'Best First'.
Re: Re: Logical AND
by waswas-fng (Curate) on Nov 26, 2002 at 18:57 UTC
    If $freq is pulled out of a file it may have a \n on it as well you don't show us how it is set so this is just a shot in the dark but if you are splitting from a flat file to get $freq then you may want to chomp the line first to pull out the \n. In any case $freq ne 'FREE' =)

    -Waswas