>>>>> "SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>> why would mod_perl have anything to do with evaling hardwired values
>> inside lc()? i have done plenty of perl code generation (see Sort::Maker
>> for one) and you can cont
Uri Guttman wrote:
> why would mod_perl have anything to do with evaling hardwired values
> inside lc()? i have done plenty of perl code generation (see Sort::Maker
> for one) and you can control that easily if you take care. the OP had a
> fixed value of or (oregon?) inside lc. so s
>>>>> "SHC" == Shawn H Corey writes:
SHC> Uri Guttman wrote:
>> my question is why is the OP doing an lc() on a fixed string? and which
>> is already lower case! someone mentioned a possible eval but that still
>> makes little sense as i
Uri Guttman wrote:
> my question is why is the OP doing an lc() on a fixed string? and which
> is already lower case! someone mentioned a possible eval but that still
> makes little sense as it would seem to need to generate that code and
> hardwiring a statename as the arg is odd.
>>>>> "R" == Ruud writes:
R> 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:
>>
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 speci
>> 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
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
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)
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 meanin
Xavier Noria wrote:
On Dec 1, 2005, at 12:48, Beast wrote:
How do I avoid this kind of warning?
Useless use of lc in void context at ./myscript.pl line 87.
Tried to use :
lc $string if $string;
but still gives warning.
I can count with my fingers the times a warning was not triggered
On Dec 1, 2005, at 12:48, Beast wrote:
How do I avoid this kind of warning?
Useless use of lc in void context at ./myscript.pl line 87.
Tried to use :
lc $string if $string;
but still gives warning.
I can count with my fingers the times a warning was not triggered by
something that
How do I avoid this kind of warning?
Useless use of lc in void context at ./myscript.pl line 87.
Tried to use :
lc $string if $string;
but still gives warning.
--
--beast
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<h
Thanks everyone. I feel sortof like a dope since I
knew that to save the results of a function, I'd have
to save it in a variable. I just forgot in the
excitement of trying to use all the functions in the
same line.
Someone, I believe Jenda, brought up that the "useless
use of lc"
Stuart White wrote:
> I want to take input from and then convert it
> to lowercase. so I tried this:
>
> lc(chomp($input = )));
Two things here:
1. It is pointless to lc a numerical value, and the boolean value [1 if a
newline was removed, 0 otherwise] returned from chomp wi
>>>>> "Stuart" == Stuart White <[EMAIL PROTECTED]> writes:
Stuart> The way it is described makes me think that I am using
Stuart> it correctly, but Perl is telling me different.
Stuart> So, am I using it incorrectly? Thanks
You're confusing function
> -Original Message-
> From: Stuart White [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 21 February 2004 9:21 AM
> To: Perl Beginners Mailing List
> Subject: lc
>
> I want to take input from and then convert it
> to lowercase. so I tried this:
>
> lc(chom
The error was:
useless use of lc in void context at line 22
I also tried this:
lc($input = );
print "$input";
> This won't work though because chomp() returns the
> number of newline
> characters removed from the string... so in essence
> you are trying to
> lowerc
From: Stuart White <[EMAIL PROTECTED]>
> I want to take input from and then convert it
> to lowercase. so I tried this:
>
> lc(chomp($input = )));
>
> and I got an error message that said I couldn't use lc
> in that way - or something like that. I can't
&g
lc() takes a string, turns the string to lower case, and returns that. So
what you're searching for is:
chomp($input = lc());
This way, lc() function turns the input into lowercase, assigns it to the
$input scalar, and then chomps out the newline at the end. Quite efficent.
In a me
> then I tried this:
> lc($input);
> and I got the same error.
This shouldn't give an error. ...It didn't give me one.
> so I tried this:
> lc(chomp($input = )));
> and I got an error message that said I couldn't use lc
> in that way - or something like tha
I want to take input from and then convert it
to lowercase. so I tried this:
lc(chomp($input = )));
and I got an error message that said I couldn't use lc
in that way - or something like that. I can't
remember the message now.
then I tried this:
lc($input);
and I got the same er
Thanks to both Peter and register for answering my questions.
-- Drew.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 1:07 PM
To: Drew Cohan
Cc: [EMAIL PROTECTED]
Subject: Re: lc vs. tr
Using Benchmark.pm ... the answer is to use
Using Benchmark.pm ... the answer is to use lc ... if you flip through to the
Perl Cookbook pg 19 or receipe 1.9 you will find that tr is the wrong way to
do changing of case (or at least tr/A-Z/a-z/ since it will miss accented
characteers and so on..)
THe reason you are getting the error is
At 11:59 AM 8/14/01 -0400, Drew Cohan wrote:
>1. Any opinions on which is better to convert characters into lowercase
>(efficiency, speed, etc)?
>
>lc vs. tr /A-Z/a-z/ ?
lc can handle locales where upper and lower case isn't the same as A-Z vs a-z.
>2. Is there an option
1. Any opinions on which is better to convert characters into lowercase
(efficiency, speed, etc)?
lc vs. tr /A-Z/a-z/ ?
2. Is there an option to tell tr to ignore case? as in:
tr/abc/222/i; #translates regardless of case
3. If #2 isn't possible, how would you use lc to conve
26 matches
Mail list logo