Hello everyone. Can anyone tell me the best way to populate a variable with a piece of a string. I need to capture all of the text after the last under score.
my $string = "3.0.0_SWNAME_48"
I'm really just trying to populate a variable with the number 48. Problem is 48 could really be 480, or 481, or any number. So I really just need to capture everything after the last underscore because it could be any number greater than 1.
Thanks in advance for any suggestions.
my $string = "3.0.0_SWNAME_48"
I'm really just trying to populate a variable with the number 48. Problem is 48 could really be 480, or 481, or any number. So I really just need to capture everything after the last underscore because it could be any number greater than 1.
Thanks in advance for any suggestions.