On Aug 20, Jeff 'japhy/Marillion' Pinyan said:

>  my $leading = $str =~ /(\s*)/ && length $1;

Or, if you're using Perl 5.6:

  my $leading = $str =~ /\s*/ && $+[0];

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to