#!/usr/bin/perl -w
use strict;
print "请输入字符串:";
my $String =
chomp $String;
print "Input String:$String\n";
my $RevString = reverse($Seq);
print "Output String:$RevString\n";
其中reverse 函数就是将字符串倒序的。
$| = 1;
print "Input string: " ;
chomp ( my $str =
print reverse split //, $str;