Soheil Shaghaghi wrote at Tue, 27 Aug 2002 18:33:42 +0200:

> I am using a program that gets the user information and stores them. The
> program stores each user data in a separate file, like userid.tmp

I hope, all users you have stored have acknowledged 
that their data is collected and munged to other databases.

> The data that is in each file looks like this:
> 
> username#!#fullname#!#email#!#userid#!#registratingdate#...#!#n
> 
> What I need to do is get the e-mail addresses and the names out of these
> files and store them all in one file.

Which names ? username or fullname.
I assume you'd like to get something like
"...." <email@...>

> I have more than 10,000 files, so I can' really do this manually.
> Is there a way to do this with Perl?
> If so, can anyone please tell me how I can do this?

What have you tried so far ?
It's hard to give you hints if we don't know your
knowledge and abilities in Perl.

However, something like

while (<FILE>) {
   my (undef,$fullname,$email) = split /#!#/, $_, 3;
   print qq{"$fullname" <$email>\n};
}
[untested]

should work for every file.


Greetings,
Janek


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to