Array not getting updated

Discussion in 'Perl Misc' started by IJALAB, Nov 19, 2006.

  1. IJALAB

    IJALAB Guest

    Hi All,

    I am new to Perl.


    My problem is:


    I have a log file that has lot of data and every line is identified by
    its first character and then processed accordingly.


    so, for example, I have a line starting with 2, from which i am
    printing some data and then proceeding.....in a certain i have some
    data in one line (say 3), which also lists the 3
    elements...(12,14,15)...
    ANother line(s) continuosly prints several elements one by one of which

    my need is to check if these elements (12,14,15) are available in any
    of these lines and print relevant info.


    I created an


    $data (stored the number of elements) and accordingly created an
    array(@data) and stored those elements in that array.


    when the next line is encountered i tried to pick every element from
    @data and compare with those line data, i am not getting the array
    elements?


    is there a simpler way to handle this situation?? where am i going
    wrong?


    need ur help.


    thanks
    bala
     
    IJALAB, Nov 19, 2006
    #1
    1. Advertising

  2. IJALAB

    DJ Stunks Guest

    IJALAB wrote:
    > <snip>


    Steps toward a fulfilling Usenet experience:

    1) Don't multipost;
    2) Provide code, not descriptions;
    3) Provide sample input, not descriptions;
    4) Provide desired output, not descriptions;
    5) Don't post anything that doesn't run silently with warnings and
    strictures enabled.

    -jp
     
    DJ Stunks, Nov 19, 2006
    #2
    1. Advertising

  3. IJALAB <> wrote:
    > Hi All,



    Hello One.

    > I am new to Perl.



    I am old to Perl.


    > My problem is:
    >
    >
    > I have a log file that has lot of data and every line is identified by
    > its first character and then processed accordingly.
    >
    >
    > so, for example, I have a line starting with 2,



    Show us an example of a data line that starts with 2 then.


    > from which i am
    > printing some data and then proceeding.....in a certain i have some
    > data in one line (say 3), which also lists the 3
    > elements...(12,14,15)...



    Then show us an example of data that also lists the 3 elements.


    > ANother line(s) continuosly prints several elements one by one of which
    >
    > my need is to check if these elements (12,14,15) are available in any
    > of these lines and print relevant info.



    Then show us some of those lines too.


    > I created an
    >
    >
    > $data (stored the number of elements) and accordingly created an
    > array(@data) and stored those elements in that array.



    Show us your code where you are doing all of that.


    > when the next line is encountered i tried to pick every element from
    > @data and compare with those line data, i am not getting the array
    > elements?



    I don't know if you are getting them or not, I don't have enough
    information to be able to answer that question.


    > is there a simpler way



    simpler than *what* ?

    You haven't shown us what you have.


    > to handle this situation?? where am i going
    > wrong?



    You are going wrong by not posting the code and data.


    > need ur help.

    ^^
    ^^

    Need real words.

    Have you seen the Posting Guidelines that are posted here frequently?


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Nov 20, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Rose
    Replies:
    4
    Views:
    6,583
    John Rose
    Dec 24, 2003
  2. =?Utf-8?B?bm93YW5kZXZlcjI5?=

    Unbound fields not getting updated, written to DB VS.Net 2003

    =?Utf-8?B?bm93YW5kZXZlcjI5?=, Apr 6, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    401
    =?Utf-8?B?bm93YW5kZXZlcjI5?=
    Apr 6, 2006
  3. Gensek

    Grid not getting updated

    Gensek, Mar 3, 2005, in forum: Python
    Replies:
    0
    Views:
    275
    Gensek
    Mar 3, 2005
  4. Gensek

    Grid not getting updated

    Gensek, Mar 3, 2005, in forum: Python
    Replies:
    2
    Views:
    268
    Gensek
    Mar 4, 2005
  5. Dmitry Korolyov

    Datagrid not updated during delete, but updated during insert and update

    Dmitry Korolyov, Sep 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    419
    Dmitry Korolyov
    Sep 22, 2003
Loading...

Share This Page