in reply to How should I read print .. if .. and ?

Basically, it's Perl shorthand for this:
if ($rows++ and $lsep) { print $fh $lsep; }
Meaning, if the two conditions are true, print $fh and $lsep print $lsep to filehandle $fh.

  higle

Update: Doh! Wasn't paying attention at all ($fh should have tipped me that it was a filehandle :c\). Thanks for the correction, RMGir!

Replies are listed 'Best First'.
Re: Re: How should I read print .. if .. and ?
by RMGir (Prior) on Aug 19, 2002 at 19:14 UTC
    ...print $fh and $lsep.

    Close. It means print $lsep to the file pointed to by filehandle $fh.

    Printing $fh and $lsep would be:

    print $fh, $lsep; # note the comma!

    --
    Mike