I am a newbie to perl and trying to find a good method to replace data at the end of input records.
Input Data looks like this:
xxxxxxxxxxxxxxxxxxxxxxx*TL*12345CTOM~
xxxxxxxxxxxxxxxx*TL*92349A~
xxxxxxxxxxxxxxxxxxx*TL*46975M~
xxxxxxxxxx*TL*73124W9~
I need the output to look like this:
xxxxxxxxxxxxxxxxxxxxxxx*TL*12345~
xxxxxxxxxxxxxxxx*TL*92349~
xxxxxxxxxxxxxxxxxxx*TL*46975~
xxxxxxxxxx*TL*73124~
So I need to remove the text after the 5-digit number but leave the tilda.
Thanks for any suggestions.
Input Data looks like this:
xxxxxxxxxxxxxxxxxxxxxxx*TL*12345CTOM~
xxxxxxxxxxxxxxxx*TL*92349A~
xxxxxxxxxxxxxxxxxxx*TL*46975M~
xxxxxxxxxx*TL*73124W9~
I need the output to look like this:
xxxxxxxxxxxxxxxxxxxxxxx*TL*12345~
xxxxxxxxxxxxxxxx*TL*92349~
xxxxxxxxxxxxxxxxxxx*TL*46975~
xxxxxxxxxx*TL*73124~
So I need to remove the text after the 5-digit number but leave the tilda.
Thanks for any suggestions.