Hi
Please let me know any fnction to do this. I have started learning perl and any guidance would be useful.
Suppose I have a string as below;
Suppose if I want to look for a word
, I can use a regex to find whether he string contains the word time or not.
But I need a way to chop the original string and count the number of characters in that string.
In tha above example
is the one I am interested. string before time is
and the length of the string is 8. How do I do it programatically ? Thanks.
Please let me know any fnction to do this. I have started learning perl and any guidance would be useful.
Suppose I have a string as below;
Code:
my $string = 'Nowisthetimeforallgoodpeopletocometotheaidoftheirparty';
Code:
time
But I need a way to chop the original string and count the number of characters in that string.
In tha above example
Code:
Nowisthe
Code:
Nowisthe
Comment