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