I have this line in a file : host clin09 { hardware ethernet 00:80:9F:2E:3F:5E ........ I have this code: While .....
if ($line =~ /^host clin09/){ system(q{perl -i.orig -pe "s/00:80:9F:2E:3F:5E/$_Globals{MAC_ADDRESS}/" c:\\cygwin\\etc\\dhcpd\\dhcpd.conf}) or die; } It works but now I wanted that 00:80:9F:2E:3F:5E to be a variable . I wanted to have this: if ($line =~ /^host clin09/){ system(q{perl -i.orig -pe "s/$MAC_ADR/$_Globals{MAC_ADDRESS}/" c:\\cygwin\\etc\\dhcpd\\dhcpd.conf}) or die; } How can I check $MAC_ADR which is what there is after hardware ethernet in the file with a regex. MAny Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]