my $string; { local $/ = undef; $string = ; } $string =~ s/$///g; my @stuff = split /%+/, $string;