in reply to check my code

All good comments so far but you should also use lexical filehandles instead of barewords:

open(FILE, '<', "$confpath/mksysbmachinelist.conf") or die $!; while(<FILE>){ ...
versus
open( my $fh, '<', "$confpath/mksysbmachinelist.conf" ) or die $!; while( my $line = <$fh> ) { ...

The reasons for preferring lexical filehandles instead of bareword are

Lexical filehandles have been around since perl 5.6 (2000) but it's only recently (perl 5.8.9) that the perldoc has been updated to reflect that lexicals are really the way to go.

-derby