wolis has asked for the wisdom of the Perl Monks concerning the following question:
A simple little questions if I may:
I would like to parse an SQL string to find the alias names used.
Since alias names are (in my SQL atleast) in the form of 'clients as c, staff as s' it is easy enough to split on ' as ' and find the next word and push it into a list so I end up with 'a' and 's' as two elements of a @list.
My question is, can this be done as a one-liner without having to build one list then loop through that building the final list?
Thanks,
___ /\__\ Creative Object World COW. \/__/ www.wolispace.com/cow "What is the world coming to?"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple little regex to build a list
by merlyn (Sage) on Feb 14, 2005 at 04:59 UTC | |
|
Re: Simple little regex to build a list
by davido (Cardinal) on Feb 14, 2005 at 05:01 UTC | |
|
Re: Simple little regex to build a list
by Errto (Vicar) on Feb 14, 2005 at 05:03 UTC | |
by wolis (Scribe) on Feb 14, 2005 at 05:19 UTC | |
by merlyn (Sage) on Feb 14, 2005 at 05:37 UTC |