in reply to subsitute s/ and match m/ failure
As clarification of what's been said elsewhere, you are testing the wrong element of the split ... to use your original code, change
to read$model =~ s/\.log$//; die if $model =~ /log/;
$ip =~ s/\.log$//; die if $ip =~ /log/;
A user level that continues to overstate my experience :-))
In Section
Seekers of Perl Wisdom