| Subject: | Extracting data from a string |
|---|---|
| From: | |
| Date: | Fri, 14 Mar 2008 16:46:41 -0400 |
| Newsgroups: | perl.beginners |
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_ccccc_.ddd The string is contained in $_. Here is my code ($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. Andrew |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Can perl find list of words from a PDF or other document and populate a database?, Stuart White |
|---|---|
| Next by Date: | Re: Extracting data from a string, John W. Krahn |
| Previous by Thread: | Info from flat file, Manoj |
| Next by Thread: | Re: Extracting data from a string, John W. Krahn |
| Indexes: | [Date] [Thread] [Top] [All Lists] |