Re: Is "lc(or)" something special?

2010-01-27 Thread Grant
>> I have a line in a script that lowercases each US state regardless of >> what case the letters are in: >> >> lc($state); >> >> I just saw an error like this: >> >> Safe: syntax error at (eval 1806) line 1, near "lc(or" >>> lc(or) >> >> Which makes me think lc(or) might have some type of special

Re: Is "lc(or)" something special?

2010-01-27 Thread Shawn H Corey
Grant wrote: > I have a line in a script that lowercases each US state regardless of > what case the letters are in: > > lc($state); > > I just saw an error like this: > > Safe: syntax error at (eval 1806) line 1, near "lc(or" >> lc(or) > > Which makes me think lc(or) might have some type of sp

Re: Is "lc(or)" something special?

2010-01-27 Thread Jim Gibson
On 1/27/10 Wed Jan 27, 2010 11:53 AM, "Grant" scribbled: > I have a line in a script that lowercases each US state regardless of > what case the letters are in: > > lc($state); > > I just saw an error like this: > > Safe: syntax error at (eval 1806) line 1, near "lc(or" >> >> lc(or) > > Wh

Is "lc(or)" something special?

2010-01-27 Thread Grant
I have a line in a script that lowercases each US state regardless of what case the letters are in: lc($state); I just saw an error like this: Safe: syntax error at (eval 1806) line 1, near "lc(or" > > lc(or) Which makes me think lc(or) might have some type of special meaning that I need to esc

Re: how to get only error/warnning messages from a file

2010-01-27 Thread John W. Krahn
V U Maheswara rao k wrote: Thanks Jhon, my search string may be more than 100 words like ("warnings", "errors", "Caution","Debug","notice","info"..etc). so that I want to get it from array and search it in each line I want to search a list in a line of file. perldoc -q "How do I efficiently m

Re: how to get only error/warnning messages from a file

2010-01-27 Thread Shlomi Fish
On Wednesday 27 Jan 2010 18:21:01 Jim Gibson wrote: > At 6:44 PM +0530 1/27/10, V U Maheswara rao k wrote: > >Thanks Jhon, > > > >my search string may be more than 100 words like ("warnings", "errors", > >"Caution","Debug","notice","info"..etc). so that I want to get it from > >array and search it

Re: how to get only error/warnning messages from a file

2010-01-27 Thread Jim Gibson
At 6:44 PM +0530 1/27/10, V U Maheswara rao k wrote: Thanks Jhon, my search string may be more than 100 words like ("warnings", "errors", "Caution","Debug","notice","info"..etc). so that I want to get it from array and search it in each line I want to search a list in a line of file. Alternat

Re: how to get only error/warnning messages from a file

2010-01-27 Thread V U Maheswara rao k
Thanks Jhon, my search string may be more than 100 words like ("warnings", "errors", "Caution","Debug","notice","info"..etc). so that I want to get it from array and search it in each line I want to search a list in a line of file. On Wed, Jan 27, 2010 at 6:28 PM, John W. Krahn wrote: > V U Ma

Re: how to get only error/warnning messages from a file

2010-01-27 Thread John W. Krahn
V U Maheswara rao k wrote: HI , Hello, I have to get only error messages and warnings text form "/var/log/messages". I wrote below code for to get only "warnings, error and caution " messages from a file. but grep command wont work. because I have to pass scalar variable to search. #!/usr/b

how to get only error/warnning messages from a file

2010-01-27 Thread V U Maheswara rao k
HI , I have to get only error messages and warnings text form "/var/log/messages". I wrote below code for to get only "warnings, error and caution " messages from a file. but grep command wont work. because I have to pass scalar variable to search. #!/usr/bin/perl use warnings; use strict; open