In my Perl program, I am having following variables in an array that are to be eliminated:
$array[0] = "--_000_41DADE848657754488503BD616F1ADE607250A88abmail2k7adventure_--";
$array[1] = "--_000_41DADE848657754488503BD616F1ADE607317EE6abmail2k7adventure_";
$array[2] = "--_000_41DADE848657754488503BD616F1ADE6073C5F3Babmail2k7adventure_--";
For different input data, I get different elements which are similar to that. How do I eliminate them by having a single regex? I am a beginner at regex, I tried the following but it dint work as expected.
$array =~ s/--_000_ .* adventure_--//g;
If you want to remove a particular type of element from a list, you can use
grep: