This one-liner inserts a delimiter line on each change of the first 40 chars. This can be quite nice for log files where each line starts with a date/time.

Change the 40 in the substr statement to change the length of the significant prefix.

cat /tmp/somefile | awk '{P=substr($0,0,40);}; L != P{print"-----";L=P;}; {print $0}' | less