On Jan 5, Prahlad Vaidyanathan said:
>> >my $leading_spaces = ($text =~ m/^(\s+)/) ; # This doesn't work
>> >print $leading_spaces ; # Prints 1
>>
>> You have executed the regex in scalar context. Why? Because the
>
>Does this mean the return value of the match is put into
Hi,
On Fri, 04 Jan 2002 Jeff 'japhy' Pinyan spewed into the ether:
> On Jan 4, Prahlad Vaidyanathan said:
>
> >I tried this :
> >
> >my $text = " this is a test" ;
> >
> ># Test 1
> >my $leading_spaces = ($text =~ m/^(\s+)/) ; # This doesn't work
> >print $leading_spaces ;
On Jan 4, Prahlad Vaidyanathan said:
>I tried this :
>
>my $text = " this is a test" ;
>
># Test 1
>my $leading_spaces = ($text =~ m/^(\s+)/) ; # This doesn't work
>print $leading_spaces ; # Prints 1
You have executed the regex in scalar context. Why? Because the
left
Hi,
Please tell me how to grab the leading spaces from a given line of text.
I tried this :
my $text = " this is a test" ;
# Test 1
my $leading_spaces = ($text =~ m/^(\s+)/) ; # This doesn't work
print $leading_spaces ; # Prints 1
# Test 2
print ($text =~ m/^(\s+)/)
Hi,
Oh nevermind .. I found Text::Tabs :-)
pv.
--
Prahlad Vaidyanathan <[EMAIL PROTECTED]>
Got Mole problems? Call Avogadro at 6.02 x 10^23.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]