This seems simple, but has me stumped. I am creating a simple (50 or 60 lines of code) image gallery (yawn) for our graphic designers and I'd like to create columns as to maximize the browser real estate. Right now it just places them one after another in a single column. Like Carl Sagan said, "It's an awful waste of space." The images from the dir they choose are globbed into an array (@pics). But I can't seem to figure out, with either array references or splicing, how to only meter out only 5 pics per row before creating a new row <tr> and continuing on metering out the array. I've surveyed other image galleries (Image Folio, Schwartz's, etc.) but a simple approach to this (complex?) problem has eluded me. I've been using Perl 'seriously' only about a year now, guess my fundamentals are lacking. Thanks, Monk's Cafe

In reply to simple column/row counter by monkscafe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.