On Wed, Sep 2, 2009 at 11:49, Telemachus wrote:
> On Tue Sep 01 2009 @ 10:44, Steve Bertrand wrote:
>> A good place to reference regex is [1].
>>
>> [1]: http://perldoc.perl.org/perlretut.html
>
> I will throw in my two cents and mention that if you are starting regular
> expressions, you may find
On Tue Sep 01 2009 @ 10:44, Steve Bertrand wrote:
> A good place to reference regex is [1].
>
> [1]: http://perldoc.perl.org/perlretut.html
I will throw in my two cents and mention that if you are starting regular
expressions, you may find perldoc perlrequick a little more gentle, as an
introduct
Tim Bowden wrote:
> On Tue, 2009-09-01 at 23:11 -0400, Uri Guttman wrote:
>> SB> newbs don't understand that, without simple code examples.
>>
>> and i explained it. it is when you are asking about X (thinking that a
>> specific way to do something) when you should be asking about Y (usually
>>
On Tue, 2009-09-01 at 23:11 -0400, Uri Guttman wrote:
> > "SB" == Steve Bertrand writes:
>
> SB> Uri Guttman wrote:
>
> >> so ask your real question about string munging and not how to do a
> >> particular technique.
>
> SB> Searching "crisler" in the archives results in four messa
> "SB" == Steve Bertrand writes:
SB> Uri Guttman wrote:
>> so ask your real question about string munging and not how to do a
>> particular technique.
SB> Searching "crisler" in the archives results in four messages. I believe
SB> he was trying, and his original question was a re
Chuck Crisler wrote:
> My immediate problem was checking a specific position in a string for a
> specific value (if the char in the first position == '#', skip the
> record). substr works OK in that case. However, I also want to learn
> more and it seems regex is a better and more powerful answer.
My immediate problem was checking a specific position in a string for a
specific value (if the char in the first position == '#', skip the
record). substr works OK in that case. However, I also want to learn
more and it seems regex is a better and more powerful answer.
Thank you,
Chuck
On Tue, 20
Uri Guttman wrote:
>> "CC" == Chuck Crisler writes:
>
> CC> How do I access specific character positions in a scalar string? In case
> CC> it makes any difference, I specifically want to test the zeroth
> CC> character. Something like the following.
>
> CC> my $str = "abc";
> CC> i
> "CC" == Chuck Crisler writes:
CC> How do I access specific character positions in a scalar string? In case
CC> it makes any difference, I specifically want to test the zeroth
CC> character. Something like the following.
CC> my $str = "abc";
CC> if ($str[0] == '#')
CC> {
CC>
Chuck Crisler wrote:
How do I access specific character positions in a scalar string? In case
it makes any difference, I specifically want to test the zeroth
character. Something like the following.
my $str = "abc";
if ($str[0] == '#')
{
do something...
}
if ( substr( $str, 0, 1 ) eq '
Chuck Crisler wrote:
> substr($str, 0, 1);
Thanks for responding with your own solution. I like follow-ups like this.
Personally, I have those 'duh' moments all the time. Unfortunately, some
of them relate to real life, and not Perl ;)
Nice.
Steve
smime.p7s
Description: S/MIME Cryptographic
duh
substr($str, 0, 1);
On Tue, 2009-09-01 at 20:49 -0400, Chuck Crisler wrote:
> How do I access specific character positions in a scalar string? In case
> it makes any difference, I specifically want to test the zeroth
> character. Something like the following.
>
> my $str = "abc";
> if ($str[
How do I access specific character positions in a scalar string? In case
it makes any difference, I specifically want to test the zeroth
character. Something like the following.
my $str = "abc";
if ($str[0] == '#')
{
do something...
}
Thank you in advance!
Chuck
--
To unsubscribe, e-ma
13 matches
Mail list logo