use strict; use warnings; use Data::Dumper; my $string = "> abcd1234 abcd abcd >xyz123 xyz"; my @substrings = $string =~ /(>.+)/g; print Dumper \@substrings;