Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Text Databases

by Snowdog (Sexton)
on Jun 02, 2000 at 11:13 UTC ( [id://15961]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://15961]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-20 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found