I do not think that regex will work if you have trailling whitespace in your input data (which there appears to be in your example above). To deal with that, try something like
m/(\w+)\W*$/;instead and see how you get on.
In reply to Re: Printing Last Element of a line using perl memory?
by hippo
in thread Printing Last Element of a line using perl memory?
by symgryph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |