#!/usr/bin/perl use warnings; use strict; my ($command, $pathname, $value); $command = shift @ARGV; $pathname = shift @ARGV; if (defined $pathname and $pathname ne '') { if (($command eq "set") or ($command eq "add") or ($command eq "del")) { $value = shift @ARGV; } else ..... } ...