Thanks for the replies guys. The poem ends like that, but it's longer about 6 stanzas. I've managed to dredge up the firt stanza from memory
Last night as I lay sleeping,
I died or so it seemed
And then I went to Heaven
But only in my dreams
It goes on about how he lead a bad life ect, and then St Peter looks at the last notation on the file and says you used to serve in the Infantry Corps, you've done your time in hell.
I saw it quite a bit in the Australian Army and our WO had it posted in the Orderly Room, but I can't find it anywhere on the internet, and I've been Googling for a couple of hours.