open (CMD, "your command |") or die "Couldn't fork: $!"; while (my $line = ) { # read output from command linewise } # or slurp the whole output into one string # { # local $/; # $string = ; # } # or read the output into an array for easy line access # my @lines = ; close CMD;