in reply to Re: Re: Converting Python to Perl and back again
in thread Converting Python to Perl and back again

There is no straightforward way in Perl, no. The way I go in Perl is most of the time using the is_deeply method from Test::More, but you end up doing the recursion manually. In Python, I've used this thing a lot in reporting sorted arrays - it's very convenient, but this is impossible under the current Perl due to the way sort works. Once could override sort to do the Right Thing whenever it encounters two arrays of references and no block is passed to it, but I don't know at what cost - and most code dosen't use that anyway.

perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web