Advertisement
cd62131

use utf8

Jan 18th, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.30 KB | None | 0 0
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. use utf8;
  5. use open qw/:encoding(utf8) :std/;
  6. use feature 'say';
  7.  
  8. my ($sec, $min, $hour) = localtime;
  9. if ($hour > 14) {
  10.   say 'こんにちは';
  11. } elsif($hour == 14) {
  12.   say "ただいま${hour}時${min}分です。";
  13. } else {
  14.   say 'さようなら';
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement