fork download
  1. #!/usr/bin/perl
  2. # "Music Live"
  3. my $str = "12 hr 60 min";
  4. my @str1 = split (/\s/, $str);
  5. if($str1[1] eq "hr" and $str1[3] eq "min")
  6. {
  7. print "correct";
  8. }
  9. my @st=split(/\s+/,$str);
  10. if($st[0]>12 or $st[1]>60 or $st[2]>60)
  11. {
  12. print "wrong";
  13. }
Success #stdin #stdout 0s 4596KB
stdin
Standard input is empty
stdout
correct