Re: Searching in a line



Can also be made like that (if you don't want to use the shell
functions)

#!/usr/bin/perl -w

open (FILE,"<file.txt");

foreach $line (<FILE>) {
if ($line =~ m/beth/) {
@items = split(",",$line);
print $items[3] . "\n";
}
}

close (FILE);

.