I have a situation where I need to delete the last n numeric characters after the / character.
For instance,
/iwmout/sourcelayer/iwm_service/iwm_ear_layer/ pomoeron.xml@ @/main/lsr_int_vnl46a/61
After the last / I need the number 61 to be removed from 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 only removes the last character, i.e. 1, in the above example.
The last part, i.e. 61 above can be anything, like 221 or 2 or 100. I need to cut out the last numeric characters after / . Is this possible in Perl?
source share