reverse

NAME

reverse - flip a string or a list


SYNOPSIS

reverse LIST


DESCRIPTION

In a list context, returns a list value consisting of the elements of LIST in the opposite order. In a scalar context, returns a string value consisting of the bytes of the first element of LIST in the opposite order.

print reverse <>; # line tac undef $/; print scalar reverse scalar <>; # byte tac