#!/usr/bin/perl -w use strict; my $result = `your shell command here`; parseResult ($result); sub parseResult { #do your magic here }