in reply to using perl to format tail -f

Please see tail -f foo.bar | cat -n. (Remember, Super Search is your friend!)