thanks lonkero, i've tried your revised script but it doesnt work at present, simply telling me it expects an expression in line 13 which is the 'if isiniprange.......'

not sure why its doing as i'm inexperienced at this but shouldnt i split up my @ipaddress0 and the range i'm looking in somehow. oh and i've drunk half the bottle lads so we need quicker responses lol, but cheers all of you anyway for helping me out,
Anth