##
$tag=substr ($data,0,index($data,'\|',));
####
Benchmark: timing 1000000 iterations of split, substr...
split: 8 wallclock secs ( 6.93 usr + 0.00 sys = 6.93 CPU) @ 144279.32/s(n=1000000)
substr: 1 wallclock secs ( 1.54 usr + 0.00 sys = 1.54 CPU) @ 648088.14/s(n=1000000)