Welcome to the Monastery.
We may be able to help...
if you provide enough detail that we can understand what you're doing!
(See I know what I mean. Why don't you? and How do I post a question effectively? re "detail" and see Markup in the Monastery on formating your post (chiefly re <c>...</c> tags around code and data.)

Please answer these questions by posting the code that generates the unsatisfactory output:

I -- for one -- am having a hard time crystal-balling code that would behave as you say. One standard bit of advice here is that those with questions post code that actually compiles under strict and warnings.

Note (just for starters) that @STATION_TYPE[$i] offends the warnings pragma (which we hope you are using along with use strict;) instigating the message: Scalar value @STATION_TYPE[$i] better written as $STATION_TYPE[$i]

Oh, yes: the standard way to find the last element in an array is to use the subscript -1 ("print $CALL_NAME[-1];") ... which, of course is not the element you actually want. But if you were to iterate backward from $CALL_NAME[-1] looking for the FIRST "25" you could save a lot of processing time.


In reply to Re: How to find last occurance in an array by ww
in thread How to find last occurance in an array by bhaskar_219

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.