I have a string like “ab.cde.fg.hi”, and I want to split it into two strings.
- “ab.cde.fg”
- “.hi”
How to do so? I got some code written that will get me the 2nd string but how do I retrieve the remaining?
$mystring = "ab.cde.fg";
$mystring =~ m/.*(\..+)/;
print "$1\n";
You can also use
split: