Try this, its simple and easy to follow

open(GD, "$path/$list") || &death("Can't open $list: um121");
@data = <GD>;
close GD;
foreach $entry (@data) {
        ($name,$email,$passwd) = split(/\|/,$entry);
        # Do something with $name $email $passwd
}


On Wed, 2002-05-22 at 14:24, Greg D. wrote:
> Hello, 
> 
> I have a script which reads a list and then puts it into an array which is 
> then inserted into a mysql DB...
> i was having problems with the part that reads the list and then splits up 
> the list that is parsed by | ..any help would be appreciated
> 
> 
> open(GD, "$path/$list") || &death("Can't open $list: um121");
> @data = <GD>;
> close GD;
> 
> @data = split (/|/, $name, $email, $passwd)
> 
> thanks
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=

Richie Crews

Unix Administrator / Internet Integrator

Email: [EMAIL PROTECTED]

Cell: (706) 773 - 3436
Desk: (706) 634 - 3681
Fax: (706) 634 - 3831

~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=


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

Reply via email to