As far as I understand from the reverse documentation , reverse works with arrays, so it should use @_ , not scalar $_ ?
The documentation says: "Used without arguments in a scalar context , reverse() overrides $_ ." [Emphasis added]
$_ = "dlrow ,olleH"; print reverse;
source share