in reply to Can't send more than 12 bytes on raw socket! (not including IP header)

Perl functions are more or less thin wrappers for OS system calls. If you get an error you don't understand, consult the appropriate man page.

EOPNOTSUPP
Some bit in the flags argument is inappropriate for the socket type.

This should have lead to check the value you were passing to the flags argument, which is clearly incorrect.