Call external command : Shell « System Functions « Perl






Call external command

      

#!/usr/bin/perl

use strict;
use warnings;

my $dir = "/home";
my $files = `dir $dir`;
print $files;

   
    
    
    
    
    
  








Related examples in the same category

1.Shell command: cat file
2.Shell command: dir
3.Shell command: uptime
4.Encrypt files