ok thanks guys... turns out a simple shift and some error-checking was enough... i'm not that advanced into perl to take a look at modules yet but thanks all the same dave, ajt... i was only looking for a quick solution since the core of the script is going to be a tough one (so expect more questions from me :-))... at least it's a comfort to know that there are modules to handle this for more complicated arguments