in reply to search file for text then only use some of the text in the line
Otherwise:
should get you started. problem areas in this code include: single vs double quotes, xml entities, large files, multiple matches etc. Don't use this as is.local $/; open my $fh,"<filename"; my $file = <$fh>; close $fh; my ($content) = $file =~ /<Directory Filename="([^"]*)"/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: search file for text then only use some of the text in the line
by Anonymous Monk on Jul 29, 2004 at 20:57 UTC |