I have a situation where I need to remove the last n
numeric characters after a /
character.
For eg:
/iwmout/sourcelayer/iwm_service/iwm_ear_layer/pomoeron.xml@@/main/lsr_int_vnl46a/61
After the last /
, I need the number 61 stripped out of the line so that the output is,
/iwmout/sourcelayer/iwm_service/iwm_ear_layer/pomoeron.xml@@/main/lsr_int_vnl46a/
I tried using chop, but it removes only the last character, ie. 1, in the above example.
The last part, ie 61, above can be anything, like 221 or 2 or 100 anything. I need to strip out the last numeric characters after the /
. Is it possible in Perl?