Kwj
03-11-2004, 06:12 PM
Hi everybody --
Thanks in advance for lending me your eyes. I must just be blind or something.
I have an input file that looks like this:
[header info]
_________
PDAILY1 [and some other stuff]
PNAME1 [etc]
PNAME2 [etc]
PDAILY2 [and some other stuff]
and I want to print every line that starts with a letter in the first column, eg the PDAILY lines. I don't want the PNAME lines because there is a space before the text starts, and I don't want blank lines either.
So here's what I have:
$line = <TMPFILE>;
while ($line = <TMPFILE>) {
if ($line eq "/\b[A-Z]/"){
system("echo $line");
}
}
I get no output. :( Would someone please recommend a solution, or a hint? I'm a total noob to regexes.
Thanks again!!
Thanks in advance for lending me your eyes. I must just be blind or something.
I have an input file that looks like this:
[header info]
_________
PDAILY1 [and some other stuff]
PNAME1 [etc]
PNAME2 [etc]
PDAILY2 [and some other stuff]
and I want to print every line that starts with a letter in the first column, eg the PDAILY lines. I don't want the PNAME lines because there is a space before the text starts, and I don't want blank lines either.
So here's what I have:
$line = <TMPFILE>;
while ($line = <TMPFILE>) {
if ($line eq "/\b[A-Z]/"){
system("echo $line");
}
}
I get no output. :( Would someone please recommend a solution, or a hint? I'm a total noob to regexes.
Thanks again!!