my $rev = reverse $string; my @strings = split ' ', $rev; print join ',',@strings;