Untitled
public text v1 · immutable#!/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");
}
}