open DEFAULT, $configfile; foreach $line ( ) { chomp($line); print "-u:$par1 -g:$line -add\n"; } close DEFAULT;