Well, the reason it's not working is that there is only one Dimview between
pairs, for a hash you need seperators between all elements. Here's a way to
do it, although I bet others can come up with a quicker/more efficient way:
<code>
my (%hash);
$_ = 'DimView 1 "All" DimView 2 "Some" DimView 3 "Most" DimView 4 "None"';
s/DimView file://g;
s/\"//g;
%hash = split( / / );
</code>
# Note, for those of you who have an option in your email program to
highlight web addresses the DimView line may have an extra file: in it.
Mine does *mumble* Took me a few minutes to figure out why!
----- Original Message -----
From: "Seitz, Scott" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 28, 2001 2:32 PM
Subject: Simple Split Question
> I'm having trouble with what I think is a very simple split question.
>
> I've got a line of text something like:
>
> DimView 1 "All" DimView 2 "Some" DimView 3 "Most" DimView 4 "None"
>
> I want a hash with (1, "All", 2, "Some", 3, "Most", 4, "None")
>
> I'm spitting on /DimView/, but I can't get the syntax to throw it into the
> hash correct. Can one of you thow me a couple of lines of code to get me
> through this?
>
> Thanks,
>
> Scott
>