Hello, I am working on a dashboard to display only 6 records(row) . In my array list i am passing a counter variable to set line number depends on the arrays count.To display the sorted records map with the line numbers in dashboard. If i have only 3 records in my array to display on dashboard ,i want to set others 3 records as blank . so my dashboard should show 3 records only and not the other 3 previously fetch records when my array had 6 records(row). Help me with the condition i can use for this ?
my @records; my $count=0; ...get the records from xml nodes foreach node ... in nodelist{ $count ++; #if ($count <= 6 ) { push @records, { line => $count, appname => $appname visible => "Yes", } #else #{ #push @records, { # line => $count, # appname => "", # visible => "No", #} } } print Dumper \@records;
Thank you!

In reply to array splice to retrieve specific records by snehit.ar

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.