Yeah, it looks like a tonumber() function is a badly needed addition to the language. I'm going to file a bug report right now.
The one (gross) workaround that I can think of is to abuse the strptime() time parser. This would only work on non-negative integers, but it might be enough for your immediate issue:
$ splunk search '* | head 1 | eval a="0001L" | eval b="0002L" | eval c=strptime(rtrim(a,"L"),"%s") + strptime(rtrim(b,"L"),"%s") | table a b c'
a b c
----- ----- --------
0001L 0002L 3.000000
... View more