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