Re: Extracting data from a string

2008-03-15 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > $_ = "aaa_b_c_.ddd"; > ($a, $b, $c, $d, $e, $e) = (split /_|\./)[1,2,3,4,5,6]; > I am not getting the "aaa". I am getting b when I should be getting a. As mentioned already, you missed that indexes start at 0. Consider: my %data; my @keys = qw/a b c d e f/

Re: Extracting data from a string

2008-03-14 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hello Hello, I have a string that I am trying to parse out into separate variables. I am having problems getting the first field extracted. I want to extract fields using period (.) and underline (_) delimineters. Here is the string aaa_b_c_.ddd The string is c

Extracting data from a string

2008-03-14 Thread andrewmchorney
Hello I have a string that I am trying to parse out into separate variables. I am having problems getting the first field extracted. I want to extract fields using period (.) and underline (_) delimineters. Here is the string aaa_b_c_.ddd The string is contained in $_. Here is my code