Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- use warnings;
- use utf8;
- use open qw/:encoding(utf8) :std/;
- use feature 'say';
- my ($sec, $min, $hour) = localtime;
- if ($hour > 14) {
- say 'こんにちは';
- } elsif($hour == 14) {
- say "ただいま${hour}時${min}分です。";
- } else {
- say 'さようなら';
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement