OK.. another question about this.. kinda...
sub table{ seek(TRACK, 0, 0); while (<TRACK>){ @trk_data = split(/;/); }
when I call this subroutine, all my other variables get lost, cause after this call there's more code, then calls to subroutines to print out my data. Those calls work no problems, but when I stick this subroutine call in my main function, all my varialbes/data collected to print get zero'd. (i hope I'm explaining this correctly). All I want to do is read a file, split the data, then later compare the data to other variables collected. If they are in this table, ok... if they are not, to print to this table. Similar problem to my first question. I thought I solved it, but I was wrong yet again!.. .. I also tried using eq as stated before, didn't work. (the numbers are set, size/length of numbers won't change) ... anyone else? I've done the almost the same thing with another function call, .. opened a file, split it and used the info that I populated into arrays for comparison, and no problem, why one here though?.. is it because I opened up this file for append (>>) ?

In reply to RE: RE: RE: Re: nonworking subroutine by Zo
in thread nonworking subroutine by Zo

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.