Evitar system con Perl



   AUTOR PREGUNTA

Publicado 20 mayo 2014 - 19:31

¿Cómo puedo evitar escapar por accidente en perl usando system?


¿Tienes la misma pregunta? Yo también

   AUTOR PREGUNTA

Publicado 20 mayo 2014 - 23:19

He intentado con esto y tampoco nada:

use IPC::System::Simple qw(system);
system("cat *.txt");

 

Publicado 21 mayo 2014 - 03:12

Genera el nombre y los argumentos del comando como un array y pasalo al system:

my(@command) = ("trash-put", 'home/$nombrearchivo');
system @command;

   AUTOR PREGUNTA

Publicado 21 mayo 2014 - 05:20

Gracias Jhony con tu solución si lo pude hacer