[....]
> -----My Response-----
> 
> If you only want to go through the file once, it may not make sense to go to
> the trouble of creating a hash.  Bottom line is that you probably want
> something like this:
> 
> # loop through the file line by line
> while (<FILE>) {
> # strip the trailing newline from the current line
> chomp;
> # split the line into name and password
> ($name,$pass)=split /\|/;
> }
> 
> Inside the while loop you will either want to do your check or you will want
> to create your hash.
> 
> /\/\ark

I am not really understanding what is the OP asking about, =)
(pls forgive my poor English) but there have some problem here....

say, if that $line = "usrid|abc|def|ghi";
($name, $pass) = split (/\|/, $line);
$pass becomes "def". better write as split(/\|/, $line,2);

perldoc -f split

Rgds,
Connie


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


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

Reply via email to