#!/usr/bin/perl use strict; use warnings; my @args = ("dir", "c:\\"); # replace this with your command and the argument system(@args) == 0 or die "system @args failed: $?"