On Sunday, 13 March 2011 at 17:37, Andy Smith wrote:
On Sun, Mar 13, 2011 at 05:36:28PM +0000, Daniel Llewellyn wrote:
> > if you want a quick decode you can use php:
> > 
> > cat file_containing_html | php -r "print 
> > html_entity_decode(file_get_contents('php://stdin'));"
> 
> Burn him!!!
I agree! your Perl is much more succinct; I would have done it in Perl had I 
been more sure of my coding in the lingo. But I would have had to google for 
the correct module, then googled for the docs for HTML::Entities, and then 
worked out how to make it into a one-liner.. Plus I'm more sure that 
html_entity_decode() will be available in any given php implementation whereas 
I don't know whether HTML::Entities is stock in most Perl distros.


--
Please post to: Hampshire@mailman.lug.org.uk
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------

Reply via email to