I have following data
I want every character after C, to be pushed into an array.
But when i write,
it only recognize first occurence of C in single line and does not consider any more occurences.
It will add only X and P and NOT Z and J.
How do i acheive that?
Code:
ABCXYCZ
DEGCPYCJ
I want every character after C, to be pushed into an array.
But when i write,
Code:
my @arr = () ;
open file
while ( <FH> ) {
if ( $_ =~ /C(.)/ ) {
push(@arr, $1) ;
}
}
It will add only X and P and NOT Z and J.
How do i acheive that?