|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Open File / Search-matchby Anonymous Monk |
| on Jan 29, 2002 at 09:12 UTC ( [id://142315]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi PerlMonks Members! First of all, this is the best perl site i have found on the net. I´m just a beginner perl coder. Any Problems/questions i had during programming scripts were solved by this site, and i got more expirienced too! Go on like this! I got anything coded by now, but with following i got a problem. Already tried several ways i found but always failed. I just need to code a very little search/paste matches script. open one database file, get each line, search for a match at current line, if yes, put line that matched in some variable, continue on next line... the lines look like this name|url|description #where '|' seperates them. i think a part of code would look like $file = 'database'; open(INF,$file); @ary = <INF>; foreach $item(@ary){ now search $item for matched text if->succed { do something } else { go get next line} } close(INF); It would be REALLY great if someone could help me! Many thanks & greeting from Germany, Stefan
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||