How to handle "\" indicating next line
- From: khairul.azmi@xxxxxxxxx (Khairul Azmi)
- Date: Wed, 28 Dec 2005 15:09:05 +0800
Hi all,
I am writing a code that would check line by line content of a line before
processing it. Problem occurs when there are lines that has character "\"
indicating a new line. For example
preprocessor http_inspect: global \
iis_unicode_map unicode.map 1252
When that happen, my code should be able to grab the whole phrase. My
current code would only capture up to "global \". Thanks in advance.
if (open (INFILE,"$snort_file")) {
while (<INFILE>) {
my $line = $_;
if ($line !~ /^[[:space:]]*#.*$/) { # handle lines start with #
if (/\S/) { # handle empty lines
my @field = split;
} elsif ($field[0] eq "preprocessor") {
get_preprocessor ($line);
}
- Follow-Ups:
- Re: How to handle "\" indicating next line
- From: usenet
- Re: How to handle "\" indicating next line
- Prev by Date: RE: file :: find problem
- Next by Date: Re: problem using -f file operator
- Previous by thread: Digest::MD5 issues
- Next by thread: Re: How to handle "\" indicating next line
- Index(es):
Relevant Pages
|
|