Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6620667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:07:52+00:00 2026-05-25T21:07:52+00:00

I have two files taken from two different server. In these two files are

  • 0

I have two files taken from two different server. In these two files are presents the matches of some football teams. As you know football teams can be called with differents names.
I would like implement a code that can recognise the same football match in the two files in order to take same variables from a file and some other from the other file.
for example in one file i have a match called

Derry City - Bray Wanderers

and in the other file i have the same match that is called

Derry City - Bray 

how can i do this?
i have no ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:07:53+00:00Added an answer on May 25, 2026 at 9:07 pm

    Very simple script to replace aliases for teams. You’ll need to fill it with aliases yourself, I made some up. If you have multiple games, the hash will overwrite the existing ones, as long as all the aliases are exchanged for full names.

    #!/usr/bin/perl
    use strict;
    use warnings;
    
    my %games;
    while (<DATA>) {
        chomp;
        my ($home, $guest) = split /\s*-\s*/, $_, 2;
        $home  = get_name($home);
        $guest = get_name($guest);
        $games{"$home - $guest"} = 1;
    }
    
    sub get_name {
    # Return the full name for the team, if it exists, otherwise return the original
        my %alias = (
            'Derry'     => 'Derry City',
            'Brawlers'  => 'Beijing',
            'Dolphins'  => 'Miami',
            'Bray'      => 'Bray Wanderers',
        );
        return $alias{$_[0]} // $_[0];
    }
    
    use Data::Dumper;
    print Dumper \%games;
    
    __DATA__
    Derry City - Bray Wanderers
    Derry City - Bray
    Brawlers - Dolphins
    Beijing - Miami
    Miami - Beijing
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two specs from two different hosts I am using: (a) Dedicated server
I have two files (f1 and f2) containing some text (or binary data). How
I have some stylesheets from different sources in my web project. I want to
I have a web application that loads some 50 tables from SQL Server into
I have two files with slight differences. A normal diff will show me the
I have two files which both contain a list of words. Is there an
I have two files, A is a subset of B. Both A and B
i have two files:(localhost/template/) index.php template.php each time when i create an article(an article
I have two files and the content is as follows: alt text http://img144.imageshack.us/img144/4423/screencapture2b.png alt
I have two files A - nodes_to_delete and B - nodes_to_keep . Each file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.