Hi Stefan,
being a Perl beginner (and a german) myself, my suggestions are:
If you like perlmonks, register and log in - it's fun!
I guess the right group for your question would be "Seekers for Perl Wisdom" and not "Discussion".
Concerning your problem:
use strict; # always do so (first thing I learned)
my $file = 'database';
my @result;
open(INF,$file) || die "Can't open $file: $!\n";
while (<INF>) { # while walking through file
if(/???/) { # if you match your searchstring
# you have to replace ??? by a regex
push @result,$_; # write current line to array
}
}
... may point in the right direction
HTH
weini
|