Saturday, September 15, 2012

How can you receive the output of an external command using open( ) in Perl?

#!C:/Perl/bin/perl -w
use strict;
open (PS, "dir/b |") || die "$!\n";
while ( <PS> )
{
   print "$_\n";
}
close (PS) or die $!;

No comments :