No it doesn't need to be an exact length but tbh its better to replace.....as said use some 3mm id, get it from ebay, i brought some from a company called zenna racing when i had my old valver.
This hose leads to the ecu and can cause idling/stalling issues if its faulty.
While your at it you might aswell replace all the other vac hoses around the engine as they will all start to be breaking down.