Re: regex help
- From: axel@xxxxxxxxxxxxxxxxxxxxxx
- Date: Fri, 15 Apr 2005 16:33:04 -0500
Scott Bryce <sbryce@xxxxxxxxxxxxxx> wrote:
> my $string = 'a = 3 b = 4 c = 5 d = 6';
> $string =~ s/=//g;
>
> my %hash = split / */, $string;
This would not work as expected if a value such as 'e = 23' appeared.
my %hash = split / +/, $string;
might be better.
Axel
.
- Follow-Ups:
- Re: regex help
- From: Scott Bryce
- Re: regex help
- References:
- regex help
- From: si
- Re: regex help
- From: Scott Bryce
- regex help
- Prev by Date: Re: regex help
- Next by Date: Re: Net::FTP problem
- Previous by thread: Re: regex help
- Next by thread: Re: regex help
- Index(es):