in reply to Reg Exp Suggestion Needed

I need to somehow pad a number to be 4 characters in length so I always end up with a 4 byte word.

There's an option in sprintf that'll help you get what you need.

perldoc -f sprintf