Fwd: SPUG:Split question

Brian Wisti brian at coolnamehere.com
Fri Mar 21 18:59:47 CST 2003


In the spirit of TASMWTSSTU[1]:

	my @list = map { "$_," } split /,/, "a,b,c,d,e,f,";

[1]: There Are So Many Ways To Screw Simple Things Up

Begin forwarded message:

> From: Joshua Keroes <jkeroes at eli.net>
> Date: Fri Mar 21, 2003  4:58:46  PM US/Pacific
> To: Brian Wisti <brian at coolnamehere.com>
> Subject: Re: SPUG:Split question
>
> Think you meant $_, not $__.
>
> Happy weekend,
> J
>
> On (Fri, Mar 21 16:11), Brian Wisti wrote:
>> In the spirit of TAAMWTDIR[1]:
>>
>> 	my @list = map { "$__," } split /,/, "a,b,c,d,e,f";
>> 	print @list, "\n";
>>
>>
>> [1]: There Aren't As Many Ways To Do It Right
>>
>> -Brian W
>>
>> On Friday, March 21, 2003, at 04:00  PM, Brian Wisti wrote:
>>
>>> In the spirit of TMTOWTDI:
>>>
>>> 	my @list = map { "$__," } split /,/ "a,b,c,d,e,f";
>>> 	print @list, "\n";
>>>
>>>
>>> :-)
>>>
>>> -Brian W
>>>
>>> On Friday, March 21, 2003, at 02:57  PM, Jim Flanagan wrote:
>>>
>>>> On Fri, 21 Mar 2003, Jim Flanagan wrote:
>>>>
>>>>> @array = $string =~ /([^,],)/g;
>>>>>
>>>>> Should get you what you want (in this particular case).
>>>>
>>>>  I omitted a crucial element: It should be
>>>>
>>>>      @array = $string =~ /([^,]+,)/g;
>>>>
>>>>  (In case you have "abc,123,def,");
>>>>
>>>> -- 
>>>> ::jimfl
>>>>
>>>>    http://jimfl.tensegrity.net
>>>>  mailto:jimfl%40t%65ns%65gr%69ty.n%65t
>>>>
>>>> _____________________________________________________________
>>>> Seattle Perl Users Group Mailing List
>>>> POST TO: spug-list at mail.pm.org
>>>> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
>>>> MEETINGS: 3rd Tuesdays, U-District, Seattle WA
>>>> WEB PAGE: www.seattleperl.org
>>>>
>>>>
>>>>
>>>>
>>> Brian Wisti (brian at coolnamehere.com)
>>> - http://coolnamehere.com/
>>>
>>> _____________________________________________________________
>>> Seattle Perl Users Group Mailing List  POST TO: spug-list at mail.pm.org
>>> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
>>> MEETINGS: 3rd Tuesdays, U-District, Seattle WA
>>> WEB PAGE: www.seattleperl.org
>>>
>>>
>>>
>>
>> _____________________________________________________________
>> Seattle Perl Users Group Mailing List
>> POST TO: spug-list at mail.pm.org
>> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
>> MEETINGS: 3rd Tuesdays, U-District, Seattle WA
>> WEB PAGE: www.seattleperl.org
>>
>
>




More information about the spug-list mailing list