Growing up in Sydney I was used to seeing the odd caterpillar or two in trees. However I've never seen this behaviour until this morning (during a work fire-drill no less!) The line of caterpillars would have been about 15-20m long...
They are known as 'processionary caterpillar' or bag shelter moth. They have stinging hairs which can cause mischief if you come into contact with them.
That's pretty cool. I don't think I have seen that before but glad you got some photos to share.
I vaguely recall it's a survival mechanism so a predator most likely a bird can only swoop down on one at a time.
As to the truth of that I don't know but it sounds good at least.