you can use "isolate-list" feature on the vlan. Isolate-list feature creates a list of isolated ports for the VLAN. Traffic received on isolated ports will not be forwarded to other isolated ports in the VLAN. Traffice will be forwarded only to non-isolated ports on that vlan.For example if ports a1-a23 is part of vlan 1,and if "isolate-list" is created with ports a1-a22, then ports a1-a22 will not be able to talk to each other. only port a23 can talk to a1-a22.
HP-Switch-5406Rzl2(vlan-1)# isolate-list a1-a22