in reply to Add Perl Varibles in system()

system( nmap $target);

Not exactly sure if that's what you're asking, but system() expects either a single string as the command to run

system("nmap $target");

or a list of values

system("nmap", $target);