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

$ perl -MO=Deparse,-p -e 'print $fh $lsep if $rows++ and $lsep;' ((($rows++) and $lsep) and print($fh $lsep)); -e syntax OK $
So, increment $rows, and if that was previously true, and $lsep is also true, then print $lsep to filehandle $fh.

Deparse is your friend. Learn to use deparse.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.