473,413 Members | 1,696 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Problem 1 Email ids Conversion code

Problem 1

This is a new set of email ids
Expand|Select|Wrap|Line Numbers
  1. 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

Expand|Select|Wrap|Line Numbers
  1. ~!*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

Expand|Select|Wrap|Line Numbers
  1. @entries =qw (.................................................);
  2.  
  3.    @list=qw (.....................................................);
  4.  
  5.  foreach $ entry ($ list)
  6.  
  7.   { $ count== 0; foreach $ list ( $ entry)
  8.   { if ($ list = ~m/$ entry/;)
  9.   { splice (@list, @ count, 1);
  10.  
  11.   print " $ entry was removed .\n";
  12.  $ count++ } } }
  13.  
  14.  Print "$_\n" for @ list;
so , what is the correct script?
Nov 29 '08 #1
3 1633
eWish
971 Expert 512MB
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.
Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
I don't understand your conversion chart. Do you have more details?

--Kevin
Nov 29 '08 #2
KevinADC
4,059 Expert 2GB
I understand the conversion but the perl code is just a total mess and I have no idea what the output should be.
Nov 30 '08 #3
Icecrack
174 Expert 100+
I agree with Kevin its a mess, i cant see how you would get that to work, second Fix your code formating

Expand|Select|Wrap|Line Numbers
  1. use strict;
  2. use warnings;
  3.  
  4. @entries =qw(.................................................);
  5. @list=qw(.....................................................);
  6.  
  7.  foreach $entry ($list)
  8.    { 
  9.      $count=0; 
  10.      foreach $list ($entry)
  11.       {
  12.         if ($list = ~m/$entry/)
  13.           { 
  14.             splice (@list, @count, 1);
  15.             print "$entry was removed .\n";
  16.             $count++;
  17.   } 
  18.  }
  19. }
  20.  
  21.  print "$_\n" for @list;
  22.  
Dec 2 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ram | last post by:
We are trying to load text tab delimited files into SQL server using informatica 5.1 version. The text files are FTPed to a local server and then files are moved to applicable folder before...
17
by: Jon Slaughter | last post by:
I'm having a little trouble understanding what the slicing problem is. In B.S.'s C++ PL3rdEd he says "Becayse the Employee copy functions do not know anything about Managers, only the Employee...
3
by: Ken Varn | last post by:
I have a managed C++ function that accepts an IntPtr argument. I am passing in a variable of type HANDLE for the IntPtr argument. The compiler does not issue any warnings for this, so I am...
8
by: andyjgw | last post by:
Hi all, hope someone can help here, I'm really stuck. Reading and googling like mad, to no avail so far... Basically, my problem *seems* to boil down to type conversion: Here's a sample web...
8
by: ctara_shafa | last post by:
Hi, I have a following problem: I'm creating a list and one of the fields should contain the date. Firstly I ask the user for the year, month and day and then I'd like to collect all this data in...
3
by: Geoff Muldoon | last post by:
Cross-posted to comp.databases.oracle.misc and comp.lang.php ... Using PHP 4.3.11 on Linux and ADODB data abstraction library. Oracle client version is 10.1. Can successfully connect to...
39
by: Martin Jørgensen | last post by:
Hi, I'm relatively new with C-programming and even though I've read about pointers and arrays many times, it's a topic that is a little confusing to me - at least at this moment: ---- 1)...
3
by: karthikla | last post by:
Hi Experts, Could you please help me on how to get access 2002 file format exactly while doing conversion from Access 97 file format by DBEngine.CompactDatabase() function? Code: Private...
43
by: John | last post by:
Hi This .net is driving me crazy!! In VB6 I had a type which contained a couple of multi-dimentional arrays which i used to create and read records: Type AAA : Array1(10,10,2) as Integer
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.