yes, that was the lasting in my mind to do.. if I do this then "what's the point of learning line 7" for what I've read in a tutorial it will output that name (for sure) and as an add up to my knowledge it does print the whole thing as long as there is the name "Cobray" on it. Actually to tell you all I didn't know that it will turned out like this what I'm thinking is that if the code runs it will just output name "Cobray" So sorry for being such a noob.. That's why Im running this test for better understanding..

What im after is how can I print that name without changing the input file.. For what I see the only solution is using either split or grep.. Is there other way if i dont want to use those.. thanks sir JavaFan,GrandFather and davido :)


In reply to Re^6: Can't get the desired output.. by astronogun
in thread Can't get the desired output.. by astronogun

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.