Bueno aquí mi code para que encode sus texto a html entities, muy bueno para los blogs.
#Autor: Yoyahack
#Webs: www.yoyahack.blogspot.com - www.undersecurity.net
#mail: elmafioso.edwin@gmail.com
#Encode strings with HTML entities
#Module
use HTML::Entities;
#Code
print "\nYoyahack - www.yoyahack.blogspot.com\nwww.undersecurity.net\n";
print "\nUsage: perl name.pl <archive.txt>\n";
print "Ex: perl script.pl archive.txt\n";
open(AR,"$ARGV[0]") || die "\nNot found archive\n";
@ar=<AR>;
close (AR);
foreach $encode(@ar)
{
chomp($encode);
encode_entities( $encode );
open (SAVE,">>encode_text.txt");
print SAVE "$encode\n";
close (SAVE);
}
print "\nSuccessfully saved text file!\n";
exit(0);
Publicar un comentario