in reply to (jeffa) Re: Reading arrays
in thread Reading arrays

Thankx.I wanted to get certain lines rather than all lines. What should I use rather than for loop?

Replies are listed 'Best First'.
(jeffa) RE: RE: Re: Reading arrays
by jeffa (Bishop) on Aug 01, 2000 at 02:15 UTC
    Just change the entire for loop to this:
    foreach (qw(0 3 8 20)) { my ($word2) = split(/ /, $lines2[$_]); my ($word3) = split(/ /, $lines3[$_]); print "$lines1[$_]:$word2:$word3\n"; }
    Just substitute the desired line numbers (each one -1, remember) inside qw(). If you do have large data files, use gryng's method below.

    To grying: sorry for making you gag, I am studying your method closely to make up for it.