Hi,
i have a string:
my $str = " hello ";
i want to be able to count only the number of spaces at the START of the line
in the eg above there are 4 spaces at the start and 2 at the end
if i do something like:
my $i = () = $str =~ /^\s/;
print $i;
the result is: 1
any help would be appreciated.
regards
Darren Edgerton
- Re: How to count the number of whitespaces a... Darren Edgerton
- Re: How to count the number of whitespa... Me
- Re: How to count the number of whitespa... Jeff 'japhy/Marillion' Pinyan
- Re: How to count the number of whitespa... Paul Johnson
- Re: How to count the number of whitespa... Jeff 'japhy/Marillion' Pinyan
- Re: How to count the number of whitespa... nfutter
- Re: How to count the number of whitespa... Curtis Poe
- Re: How to count the number of whitespa... Jeff 'japhy/Marillion' Pinyan
- Re: How to count the number of whit... Jeff 'japhy/Marillion' Pinyan
- Re: How to count the number of whit... Curtis Poe
