본문 바로가기

SW개발/Etc

[Perl] linux command 결과를 받아오기


my $cmd = "/bin/mount /dev/sdb1 ./usb 2>&1";


open(FD, "$cmd |");

while(<FD>) {

print "ret : $_";

}

close FD;