Veamos el programa cliente:
lhp@nereida:~/Lperl/src/systemcommand$ cat -n script/usesystemcommand.pl 1 #!/usr/bin/perl -I../lib -w 2 use strict; 3 use System::Commands qw{ls}; 4 5 my $f = shift || 'pe*.pl'; 6 7 print "\n******Contexto de lista*********\n"; 8 my @files = ls("-l", "-t", "-r", $f); 9 print @files; 10 11 print "\n******Contexto escalar*********\n"; 12 my $files = ls("-l", "-t", "-r", $f); 13 print $files; 14 15 print "\n******No existe*********\n"; 16 my @r = chuchu("a");
Casiano Rodríguez León