in reply to Re^3: Filtering Output from two files
in thread Filtering Output from two files

It is me who posted anonymously since we aren't allowed to log in at the university.
I didn't get where I missed "sigil $ in line once".
Furthermore, i am getting errors such as Use of uninitialized value in line 34 at variables $row and $fields at the penultimate line.
So when i place the  print $row if exists $hash{$fields[0]}; after the loop it gives an error "Perl requires explicit package name"
i am really a novice at this if you could guide me in this I would learn more.

Replies are listed 'Best First'.
Re^5: Filtering Output from two files
by LanX (Saint) on Feb 05, 2018 at 15:10 UTC
    > It is me who posted anonymously 

    I'm glad you are making progress. :)

    > I didn't get where I missed "sigil $ in line once". 

    $hash{line}=1; # should be $hash{$line}=1;

    > Use of uninitialized value in line 34 

    You probably parse empty lines resulting in undefined variables.

    Skip them with next , compare Re: Filtering Output from two files

    >  after the loop 

    The print belongs inside the loop.

    please use code tags and indentation in your next post.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery