fork download
  1. #!/usr/bin/perl
  2. use strict;
  3. use warnings;
  4. #******************************
  5. my @tab_filtr=();
  6. my @tab_parametr=();
  7. my $tmp=<STDIN>;
  8. my $c=0;
  9. my $liczP=0;
  10. my @buf;
  11. my $liczF=0;
  12. while($tmp ne "<<KONIEC>>\n")
  13. {
  14. chomp($tmp);
  15. if($tmp =~/^-/)
  16. {
  17. $tmp=~s/^-//;
  18. @buf=split(//,$tmp);
  19. print length(@buf);
  20. }
  21. else{
  22. $tab_parametr[$c]=$tmp;
  23. $liczP++;
  24. }
  25. $tmp=<SDIN>;
  26. }
  27. #************************
  28. if($liczP < $liczF){
  29. print "Za malo parametrow!\n";
  30. exit;
  31. }
  32. #*********************
  33. my @wejscie=();
  34. while(<STDIN>)
  35. {
  36. if($zmienna eq "\n"){
  37. last;
  38. }
  39. chomp $zmienna;
  40. push @wejscie,$zmienna;
  41. }
  42. #*********************************
  43. print "@tab_parametr\n";
  44. print "@tab_filtr\n";
  45. print "@wejscie\n";
Runtime error #stdin #stdout 0s 4724KB
stdin
Standard input is empty
stdout
Standard output is empty