[ale] PHP -> Perl

Calvin Harrigan charrig at earthlink.net
Sun Apr 20 19:09:37 EDT 2003


Hi all,
	I've been fooling around with converting a bit of PHP code to PERL. 
Not being a user of either language I was able to get everything
converted except the following:

<PHP CODE>
while(!preg_match("/^(\d+)\s+(\S+)$/", $retstr, $matches))
{
  #do stuff
}

</PHP CODE>

I have not been able to mimic this functionality in perl.  I have gotten
as far as:

<PERL CODE>
while (not ($retstr =~ /^(\d+)\s+(\S+)\1\2$/g ))
{
    #DO STUFF;
}
$matches[1] = $1;
$matches[2] = $2;
</PERL CODE>

This seems to almost work but I'm missing something.  I have been
scouring the web all afternoon, but just can't finish it up, any input
would greatly be appreciated.


Thanks!


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list