#!/usr/bin/perl use warnings; use strict; use IPC::Open3; my $pid = open3(\*WRITE, \*READ,0,"/usr/bin/cdrecord -v -dummy -eject /mnt/my.iso"); #if \*ERROR is false, STDERR is sent to STDOUT #while(1){ #select(undef,undef,undef,.01); chomp(my $output = ); print "$output\n"; #do some split and test to extract percentage #} waitpid($pid, 1); # It is important to waitpid on your child process, # otherwise zombies could be created.