Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl: How to perfectly match specific data between two files and do comparison?

by jwkrahn (Monsignor)
on Jul 24, 2013 at 02:16 UTC ( #1045983=note: print w/replies, xml ) Need Help??


in reply to Perl: How to perfectly match specific data between two files and do comparison?

use warning;

Should be:

use warnings;
$ncc = 0; $pc = 0; $fc = 0;

Should be:

my $ncc = 0; my $pc = 0; my $fc = 0;
sub fileA_ext() {

Should be:

sub fileA_ext {
while (@array = <FileA>) {

Should be:

my @array = <FileA>;
foreach $line(@array) {

Should be:

foreach my $line ( @array ) {
$name1 = "$1"; $score1 = "$12";

Should be:

$name1 = $1; $score1 = $12;
foreach $line (@tmp1) {

Should be:

foreach my $line ( @tmp1 ) {
my $name2 = "$1"; substr($name2, -13) = ''; my $score2 = "$12";

Should be:

my $name2 = $1; substr($name2, -13) = ''; my $score2 = $12;
sub FileB_ext() {

Should be:

sub FileB_ext {
while (@array = <FileB>) {

Should be:

my @array = <FileB>;
foreach $line(@array) {

Should be:

foreach my $line ( @array ) {
my $name3 = "$1"; my $score3 = "$12";

Should be:

my $name3 = $1; my $score3 = $12;
foreach $line (@tmp2) {

Should be:

foreach my $line ( @tmp2 ) {
my $name4 = "$1"; substr($name4, -13) = ''; my $score4 = "$12";

Should be:

my $name4 = $1; substr($name4, -13) = ''; my $score4 = $12;
sub check() {

Should be:

sub check {
foreach $data1 (@arr1) {

Should be:

foreach my $data1 ( @arr1 ) {
my $ep1 = "$1"; my $s1 = "$2";

Should be:

my $ep1 = $1; my $s1 = $2;
foreach $data2 (@arr2) {

Should be:

foreach my $data2 ( @arr2 ) {
my $ep2 = "$1"; my $s2 = "$2";

Should be:

my $ep2 = $1; my $s2 = $2;
if ( $ep1 eq $ep2 && $s1 =~ m/-/g) {

Should be:

if ( $ep1 eq $ep2 && $s1 =~ m/-/) {
if ( $ep1 eq $ep2 && $s1 !~ m/-/g && $s1 > 50 && $ +s2 > 40) {

Should be:

if ( $ep1 eq $ep2 && $s1 !~ m/-/ && $s1 > 50 && $s +2 > 40) {
if ( $ep1 eq $ep2 && $s1 !~ m/-/g && $s1 < 50 && $ +s2 < 40) {

Should be:

if ( $ep1 eq $ep2 && $s1 !~ m/-/ && $s1 < 50 && $s +2 < 40) {

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045983]
help
Chatterbox?
[ambrus]: Today I accidentally cut my hand while carrying a computer. On the display part of the motherboard that sticks out at the back of the chasis and has ports, there's this thin metal sheet with holes cut for the ports, to guide plugs into the sockets.
[ambrus]: This sheet has sharp needle-like parts, 0.004 long and less than 0.001 wide, that can get bent to point outwards, and one of these cut into my palm when I lifted the box.
[ambrus]: So now when I choose what motherboard to buy for my new home computer, I have one more specific property to guide me. Useful, because there's so many different boards to choose from.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-01-16 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.