Advertisement
TShiva

frequences

Feb 26th, 2017
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.46 KB | None | 0 0
  1.   GNU nano 2.5.3                                          File: frequences.pl                                                                                          
  2.  
  3. #!usr/local/bin/perl
  4. use 5.010;
  5. use strict;
  6. use warnings;
  7.  
  8. open my $file, '<', "garri.txt" or die 'Невозможно открыть файл$!\n';
  9. my $count=0;
  10. my $buffer;
  11. while(read $file, $buffer, 16){
  12. if ($buffer=="a"){
  13. ++$count;
  14. }
  15. }
  16. close $file;
  17. print $count;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement