Hi Morgan,
You could read each line of your text file split each line on whitespace into a bunch of variable ($username, $junk, $password, $address) = split; split $address on @ to get the domain name ($user, $domain) = split('@'); read all this into a domain hash keyed by the user name $domain{$user} = all this stuff... now you'll have a bunch of hashes with the details you want just make the directories and files and write each hash out You'll have to read on split(), open(), mkdir() and a little on data structures to get it sorted... Hope this helps, deen On 25 Jan 2002, Morgan Norell wrote: > Hi > > I need help with this: > > I have a text file looking like this > > username || password [EMAIL PROTECTED] > username || password [EMAIL PROTECTED] > username || password [EMAIL PROTECTED] > .... > > I need a perl program who makes a file of each domainX.com in a > separate directory and the program will also > write every username and mailaddess to the file with the same name. > The files should have this format. > > username [EMAIL PROTECTED] > username [EMAIL PROTECTED] > > Can anyone give me some hints how to do this I'am totaly lost. > > > Morgan. > > > > > > -- -- Deen Hameedd <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]