in reply to extract part of line

CPAN has many solutions for your problem, search for fixed

Ciao, Valerio