onday, January 14, 2002 12:53
> To: Beginners (E-mail)
> Subject: Re: excluding comments in a line
>
>
> On Mon, Jan 14, 2002 at 12:44:34PM -0500, Yacketta, wrote:
> > Folks,
> >
> > I am reading in a .cfg file and exclude comments (#) and
> spaces at the
>
On Mon, Jan 14, 2002 at 12:44:34PM -0500, Yacketta, wrote:
> Folks,
>
> I am reading in a .cfg file and exclude comments (#) and spaces at the
> beginning of the line
> how would I lop off any comments in a line?
>
> IE:
>
> Key "value" # comment here
---end quoted text---
while(){
nex
How about splitting the line.
@lines = ("foo=bar # stuff", "bar=foo # more stuff");
foreach (@lines) {
my ($line) = split(/\s*#/);
print "$line\n";
}
John
-Original Message-
From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
Sent: 14 January 2002 17:45
To: Beginners (E-m