All pastes #533813 Raw Edit

Stuff

public text v1 · immutable
·published 2007-06-03 16:13 UTC
rendered paste body
#!/usr/bin/perl


open(FILE1, "file1.txt");
open(FILE2, "file2.txt");

my @file1lines;

while(<FILE1>)
{
        chomp($_);
        push(@file1lines, $_);
}

while(<FILE2>)
{
        my $issame = 0;
        chomp($_);

        foreach $line(@file1lines)
        {
                if($line eq $)
                {
                        $issame = 1;
                }
        }
        if($issame = 1)
        {
                print("$_\n");
        }
}