which makes $offset set to 12. The problem is, I need the second page to define $offset as 6, the third page to define $offset as 12, etc. I tried using:

$offset = ($paged * 6 - 6)

which works except on the first page. On the first page it defines $offset as -6. SO, I wanted to create an if statement that says if $paged is equal to 0 then $offset is equal to 0, else $offset is equal to ($paged * 6 - 6).

I struggle with syntax, even though I understand what needs to be done here. Any help would be greatly appreciated. Thanks!

The max() solution, while clever, may be confusing for a future maintainer.
–
Emil VikströmJun 18 '12 at 18:01

yes and no... it will also make him learn a simple trick. :-)
–
FatalErrorJun 18 '12 at 18:16

There's often a conflict between "simple tricks" and "maintainability". Otherwise everybody would be happy Perl coders.
–
Emil VikströmJun 18 '12 at 18:20

you are absolutely right. I am actually big fan of tricks and smart coding. Thats why I oftenly use ternary operator wherever I can. Some may prefer to use if-else instead of ternary.
–
FatalErrorJun 18 '12 at 18:27