T
Tony
Hello All,
I am very new to Perl and I am trying to pull a substring out of a
larger string as such:
xyxyxyxyxyxyZZxyxyxyxyxyx
I know if I get the index of ZZ in the string can use substr($string,
$index, $len) where len is the number of charcters I want.
I am looking through the Programming Perl book from O'Reilly and I can
not find any easy way to search through the string and get this value.
I have done this several time in java like such and I am trying to the
same thing in Perl:
String str = "xyxyxyxyxyxyZZxyxyxyxyxyx";
int len1 = str.indexOf("ZZ");
String str2 = str.substring(len1, (len1 + "ZZ".length()));
I am sure between something I get here and what I am reading I will
figure this out. Thanks in advance for any help
-Tony
I am very new to Perl and I am trying to pull a substring out of a
larger string as such:
xyxyxyxyxyxyZZxyxyxyxyxyx
I know if I get the index of ZZ in the string can use substr($string,
$index, $len) where len is the number of charcters I want.
I am looking through the Programming Perl book from O'Reilly and I can
not find any easy way to search through the string and get this value.
I have done this several time in java like such and I am trying to the
same thing in Perl:
String str = "xyxyxyxyxyxyZZxyxyxyxyxyx";
int len1 = str.indexOf("ZZ");
String str2 = str.substring(len1, (len1 + "ZZ".length()));
I am sure between something I get here and what I am reading I will
figure this out. Thanks in advance for any help
-Tony