Ho codice bash breveutilizzando il comando bash in perl
cat example.txt | grep mail | awk -F, '{print $1}' | awk -F= '{print $2}'
voglio usarlo in script perl, e mettere la sua uscita ad una linea di matrice per riga. Ho provato questo, ma non ha funzionato
@array = system('cat /path/example.txt | grep mail | awk -F, {print $1} | awk -F= {print $2}');
Grazie per l'aiuto ...
[Questa domanda] (http://stackoverflow.com/questions/797127/whats-the-differences-between-system-and-backticks-and-pipes-in-perl) fornisce alcuni esempi di come chiamare programmi esterni in Perl. –