poj#!/usr/bin/perl use warnings; use strict; my %git=(); my $git_file = "/tmp/git_sorted.log"; open(GIT,'<',$git_file) or die "Really bad $git_file : $!"; while (<GIT>){ chomp; $git{$_}=1; } close GIT; my $yum_file = "/tmp/yum_sorted.log"; open(YUM,'<',$yum_file) or die "Really, really bad $yum_file : $!"; while (<YUM>){ chomp; if (exists $git{$_}){ # exists } else { # new print "$_ package not in $git_file\n"; } } close YUM;
In reply to Re: Breaking out of a loop
by poj
in thread Breaking out of a loop
by rodbass63
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |