parsing question

mikeraz at patch.com mikeraz at patch.com
Thu Mar 22 13:57:16 CST 2001


I'm parsing a web form generated data set that looks like:

name:   data
fname:  data
time3:30-6:00:	data
morestuff:
gunk-o-rama:	data

The colons are followed by spaces or end of line, never tabs.

I thought that 
	($fieldname, $data) = split /: */;  
would do the trick, but that ended up splitting the time entry at the first
colon.

Huh?  '3' ne ' ' so what am I misunderstanding here?

And no, I did NOT design the web form that generates this.


-- 
    Michael Rasmussen   mikeraz at patch.com
   Be appropriate && Follow your curiosity
     But keep in mind:
A couple more shots of whiskey, women 'round here start looking good.

		[something about a 10 being a 4 after a six-pack?  Ed.]
TIMTOWTDI



More information about the Pdx-pm-list mailing list