@arglist = split(/\ /), $args); foreach $item (@arglist) { if ($item =~ /-iL/) { - need to move to the word right after this value - (mylink) - and assign it to a variable, and break out } }