Re: foreach routine
- Posted by ags <eu at 531pi.co.nz> Dec 22, 2006
- 664 views
duke normandin wrote: > > Coming from Perl, I'm trying to emulate the following: > > read(STDIN, $buffer, $ENV{CONTENT_LENGTH}); > @pairs = split(/&/, $buffer); > foreach $pair (@pairs){ > ($name, $value) = split(/=/, $pair); > blah > blah > } BTW you will probably miss tightly integrated regular expression too. I've been meaning to wrap the perlre.dll for a while now but it's a bit of a headache everytime I look at the API :) That and the fact that you can't just drop in a RE in things like split, unpack, etc. But I use Perl and Euphoria equally as much... Perl for CGI and general scripting for server stuff and Euphoria for Windows programming and general scripting on Windows. Gary