Assignments are given to 'rob in' what you have been taught or to provoke you to read more or reserach further, asking questions.
I will give a working code (one of the several ways), but with some lines replaced with comments. Find, understand and fill in the blank spaces and you have your assignment answered.

#!/usr/bin/perl use warnings; use strict; use Data::Dumper; my ( ____, ____ ) = @ARGV; ## get the filenames from the CLI my %number_freq; ## declare an hash to use open my $fh, '<', $file2 or die "can't open cos:$!"; while (<$fh>) { chomp; next if $_ == 0; ## Using each value read from file handler as an hash key, initial +ize the hash value for ## each key to 0 __________________________________________; } close $fh or die "can't close: $!"; open $fh, '<', $file1 or die "can't open cos:$!"; while (<___>) { ## fill in this chomp; next if $_ == 0; ## If the hash key exists increase it's value by 1. __________________________________________; } close $fh or die "can't close: $!"; print Dumper \%number_freq; ## used to display the result
In addition to this, in place of using Data::Dumper module with the print function to output your answer, you will have to write out your own print output.
Please, do not attempt to run this without filling in the blank spaces.
Hope this helps


In reply to Re: frequency strings 2 files by 2teez
in thread frequency strings 2 files by philbertcheese86

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.