I have a string "sample.1.csv.main" want to split into array from 2nd element.
Here is the code I had tried
Code --
my $str = "sample.1.csv.main";
my @arra = split('\.',$str,2);
print "first element : $arr[0]";
OUTPUT :
first element : sample
DESIRE OUTPUT :
first element : sample.1