#!/usr/bin/env perl # Prints "hello world": print reverse "hello world"; print "\n"; # Prints "dlrow olleh": my $a = "hello world"; $a = reverse $a; print $a; print "\n"; # All of these print "hello world": sub myfunc { print $_[0]; print "\n"; } myfunc("hello world"); myfunc(reverse "hello world"); myfunc(reverse("hello world")); # This _actually_ works: myfunc scalar reverse "hello world";