use v6; use Bailador; get '/' => sub { ' <html> <head><title></title></head> <body> <form method="get" action="/string"> String:<input type="text" name="text"> <input type="submit"> </form> </body> </html> ' } #这个get对应表单的get, 如果是post改为相应的post get '/string' => sub { my $input = request.params<text>; #输入获取, 对应input中的name='text' 'You input: '~$input; } baile;