Re: foreach routine

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu