Problem 1 Email ids Conversion code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • patelg1
    New Member
    • Nov 2008
    • 1

    Problem 1 Email ids Conversion code

    Problem 1

    This is a new set of email ids
    Code:
    vfojob@gee.com,dooejas@gee.com,viobes2@gee.com,asbxxv@gee.com,gibees@gee.com,fiddef@gee.com,vihhoo@gee.com,giboss@gee.com,veedi@gee.com,ekdnm@gee.com,kimsrp@gee.com
    This is the old set of email ids in the numerical format

    Code:
    ~!*37!@644.2>_576138@644.2>_013*9*@644.2>_6794@644.2>_%'4&3@644.2>_6>>558@644.2>_<2~`84@644.2>_<`93@644.2>_%>`&8@644.2>_84&3<3@644.2>_2~9~8@644.2>_2:319@644.2>_
    conversion code is being used as mentioned below [a-j] by [0-9] and [k-z] by [~!_<>%^&*() ; `"=?]

    I wish to store the new set of email ids along with the already existing old set of email ids which were stored in numerical format. I have problem in obtaining the repeated email ids after saving the new set in the old . this is the script used to resolve this problem but there is an error

    Code:
    @entries =qw (.................................................);
    
       @list=qw (.....................................................);
    
     foreach $ entry ($ list)
    
      { $ count== 0; foreach $ list ( $ entry)
      { if ($ list = ~m/$ entry/;)
      { splice (@list, @ count, 1);
    
      print " $ entry was removed .\n";
     $ count++ } } }
    
     Print "$_\n" for @ list;
    so , what is the correct script?
    Last edited by eWish; Nov 29 '08, 11:02 PM. Reason: Please use code tags
  • eWish
    Recognized Expert Contributor
    • Jul 2007
    • 973

    #2
    Did you write this code? You should learn the basics first. Your script should not even complie correctly.

    Add these two lines to your script and fix your syntax errors.
    Code:
    use strict;
    use warnings;
    I don't understand your conversion chart. Do you have more details?

    --Kevin

    Comment

    • KevinADC
      Recognized Expert Specialist
      • Jan 2007
      • 4092

      #3
      I understand the conversion but the perl code is just a total mess and I have no idea what the output should be.

      Comment

      • Icecrack
        Recognized Expert New Member
        • Sep 2008
        • 174

        #4
        I agree with Kevin its a mess, i cant see how you would get that to work, second Fix your code formating

        Code:
        use strict;
        use warnings;
        
        @entries =qw(.................................................);
        @list=qw(.....................................................);
         
         foreach $entry ($list)
           { 
             $count=0; 
             foreach $list ($entry)
              {
                if ($list = ~m/$entry/)
                  { 
                    splice (@list, @count, 1);
                    print "$entry was removed .\n";
                    $count++;
          } 
         }
        }
         
         print "$_\n" for @list;

        Comment

        Working...