Categoría: perl

  • LWP will support https URLs if either Crypt::SSLeay or IO::Socket::SSL

    Si estais cacharreando con los comandos y quereis hacer un GET o POST usando https os puede aparecer esto : [shell] $ GET https://www.hostingaldescubierto.com LWP will support https URLs if either Crypt::SSLeay or IO::Socket::SSL is installed. More information at <http://search.cpan.org/dist/libwww-perl/README.SSL>. [/shell] y la forma de solucionarlo es instalando las liberías de perl que hacen falta:…

  • perl forking

    Esquema de como montar forks con perl, [shell] #!/usr/bin/perl my $pid = fork(); my @childs ; if ( not defined $pid ) {     # error no se puede crear el forkç     print » no es posible crear el fork «; } if ( $pid == 0 ) {     # es un hijo…

  • Borrar modulos de Perl instalados con CPAN

    http://www.cpan.org/misc/cpan-faq.html#How_delete_Perl_modules [shell] #!/usr/local/bin/perl -w[/shell] use ExtUtils::Packlist; use ExtUtils::Installed; $ARGV[0] or die «Usage: $0 Module::Name\n»; my $mod = $ARGV[0]; my $inst = ExtUtils::Installed->new(); foreach my $item (sort($inst->files($mod))) { print «removing $item\n»; unlink $item; } my $packfile = $inst->packlist($mod)->packlist_file(); print «removing $packfile\n»; unlink $packfile;

  • Instalación de módulos de perl

    [shell] perl -MCPAN -e ‘install Net::SNMP::Interfaces::Details’ [/shell] alternativa [shell] perl -MCPAN -e shell cpan> install Net::SNMP::Interfaces::Details [/shell] Si encuentra errores: [shell] perl -MCPAN -e shell cpan> make Net::SNMP::Interfaces::Details [/shell] Detallará donde se encuentra el error Ejemplo: [shell] … Looks good Writing Makefile for Net::SNMP::Interfaces Can’t exec «/usr/bin/make»: No existe el fichero o el directorio at…

  • Script de Perl para DBI

    Esta es mi plantilla de perl para un script con DBI Ver documentación en http://mysql.turbolift.com/mysql/DBD_3.21.X.html