Thank-you so much Dave! I am really grateful to you. I sort agree this is a bad way to study Perl. But then again, this is a work that fell in my lap, and they just expect me to do it ASAP whether I know Perl or not. I had to understand this code in order to make the required hacks/modifications to meet my new specs.

I got the books you have told me to fetch from the company library :). Btw, to answer your question why is the scalar value nested in so deep, that is the way the log file is which I need to dig out the data from. It's from a Universal format for Scientific data called NetCDF unfortunately.

For Question 3. I want to write down what I understood. I know parse0FFA is a function inside the .pm file Fruits.pm and that obj is a reference to that pm file and by $obj->parse0FFA() I am able to fetch a sub from that pm file. Correct me if I am wrong thus far.

Now, you used a term 'deference' which I didn't understand in your answer. Here. Lets try again. Are you telling me sir that in

$fruitobj=$obj->parse0FFA($BananaNum);

the number of Bananapackets is given to the subroutine parse0FFA() which is in the pm file and the result (or return) of that function is now stored in the scalar variable $fruitobj. And that $obj is only a reference (what we call objects in C or C++) to the function parse0FFA ? Is that a correct understanding. I think I am getting the hang of Perl now. At-least syntax and coding style. And finally for Q7. I fully understand your answer. Thankyou. Please read your answer again. Now, I have a question. Is the $obj->{timestamp} the reference $obj from the logprocess.pl file or is this a local reference $obj from the .pm file? I think it's the latter, but just wanted to check. Thanks again!


In reply to Re^2: I have a perl snippet. And I need help understanding it. Can you help answer these questions. by Fighter2
in thread I have a perl snippet. And I need help understanding it. Can you help answer these questions. by Fighter2

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.