TecBrat Posted April 17, 2007 Share Posted April 17, 2007 I think I need to learn one function, or one complex regular expression and I'd be okay. This is actually to parse xml returned from authorize.net automatic recurring billing. if there are any other soulutions that you know of, I am definatly interested in hearing them. Here's the php code: function parse_return($content) { $refId = substring_between($content,'<refId>','</refId>'); $resultCode = substring_between($content,'<resultCode>','</resultCode>'); $code = substring_between($content,'<code>','</code>'); $text = substring_between($content,'<text>','</text>'); $subscriptionId = substring_between($content,'<subscriptionId>','</subscriptionId>'); return array ($refId, $resultCode, $code, $text, $subscriptionId); } Link to comment https://forums.phpfreaks.com/topic/47410-i-have-a-php-snippet-and-i-need-it-converted-to-perl-can-anyone-help/ Share on other sites More sharing options...
marcus Posted April 17, 2007 Share Posted April 17, 2007 http://www.cs.wcupa.edu/rkline/perl2php/ I suggest reading/looking threw that. Link to comment https://forums.phpfreaks.com/topic/47410-i-have-a-php-snippet-and-i-need-it-converted-to-perl-can-anyone-help/#findComment-231320 Share on other sites More sharing options...
TecBrat Posted April 19, 2007 Author Share Posted April 19, 2007 ... This is actually to parse xml returned from authorize.net automatic recurring billing... I found a Perl Module called XML::Simple that gives me a good start. Link to comment https://forums.phpfreaks.com/topic/47410-i-have-a-php-snippet-and-i-need-it-converted-to-perl-can-anyone-help/#findComment-233439 Share on other sites More sharing options...
Ninjakreborn Posted April 19, 2007 Share Posted April 19, 2007 http://www.google.com/search?hl=en&q=PHP+to+Perl+converter&btnG=Google+Search Link to comment https://forums.phpfreaks.com/topic/47410-i-have-a-php-snippet-and-i-need-it-converted-to-perl-can-anyone-help/#findComment-233462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.