in reply to Text Databases

Start with the library. The intro to data structures is excellent. It would be easy to make it a list of lists just through your file into an array and then search by position. @C = <INFILE>; $start = 0; foreach $foo(@C) { until ($start > $#@C) if($foo$start=~/joe || bob/) {push (@NewUser,$foo$start); $start++; push (@NewUser,$foo$start); $start++; push (@NewUser,$foo$start); $start++; push (@NewUser,$foo$start); $start++;} $start++;} {push (@AllUsers, @NewUser;} you get @AllUsers = ( 'joe','2','9','8', 'bob','4','u','2', ); or a hash where Joe is the key and the value is a list of the next three lines. Just my little thoughts. Gandalf tea Wednesday.

Replies are listed 'Best First'.
RE: Re: Text Databases
by Snowdog (Sexton) on Jun 02, 2000 at 11:14 UTC
    need to work on that formattin. Gandalf tea Wednesday.
RE: Re: Text Databases
by Snowdog (Sexton) on Jun 02, 2000 at 11:21 UTC
    @C=<<>INFILE<>> lost in the formatting. Sorry.
      ok I really need to work on the formattin. one last try for the night. @C=<INFILE>
RE: Re: Text Databases
by athomason (Curate) on Jun 02, 2000 at 14:25 UTC
    See the Site How To for info on formatting stuff. The easiest way is to embed code blocks in <CODE></CODE> tags; everything inside them will be spaced as intended and it won't strangely interpret any of your characters. Also, rather than posting 4 follow-ups, if you go to the actual node of your original reply, you can modify it in most cases.