Skip to content

Instantly share code, notes, and snippets.

@tomcha
Created December 19, 2015 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomcha/8f4352def6620de85b9e to your computer and use it in GitHub Desktop.
Save tomcha/8f4352def6620de85b9e to your computer and use it in GitHub Desktop.
ouyou6
#!/usr/bin/env perl
use strict;
use warnings;
print "1つ遅れて返事する君(終わる時は、'END'と入力しましょう。)\n";
my $str = 'こんにちは。';
my $str_next = 'あなたの名前はなんですか?';
for (;;){
print "com>> $str\n";
print "you> ";
$str = $str_next;
$str_next = <STDIN>;
chomp $str_next;
last if $str_next eq 'END';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment