Re: Processing a text file

2002-01-26 Thread Deen Hameed
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 $dom

Re: Processing a text file

2002-01-25 Thread Sudarsan Raghavan
Morgan, You will have to refer the manpages for these functions 1) split (perldoc -f split) 2) open (perldoc -f open) 3) chomp (perldoc -f chomp) The way to do this would be 1) Read in every line of the text file and chomp of the newline 2) Split the line such that you end up an array like this

Re: Processing a text file

2002-01-25 Thread Jon Molin
Morgan Norell wrote: > > > Can anyone give me some hints how to do this I'am totaly lost. > read about files and regexps. There's a good book called 'learning perl' you should check out. If you're not interested in buying books, check the online info and perldoc. If you're not interested in l

Processing a text file

2002-01-25 Thread Morgan Norell
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 dir