Ok, what is it that you want? It's hard to read when the code is split up over
the page.
Maybe it already answered your questions ??
#!/usr/local/bin/perl
#
$username = param('username');
open(USER, "< user.dat");
while (<USER>) {
chomp;
($name, $site, $site_id, $des, $email, $pass) = split(/\|/, $_);
if ( $site_id eq $username ) {
push my @usereq, $_;
.....
}
}
close(USER);
# -------------------------
>
> ---CODE---
> open(USER, "user.dat");
> @user = <USER>;
> close(USER);
> -END CODE-
>
> Ok thats my textfile and this is how I usually read
> through the lines
>
> ---CODE---
> foreach $line (@user) {
> chomp($line);
> ($name, $site, $site_id, $des, $email,
> $pass) = split(/\|/,$line);
> }
> -END CODE-
>
> Now what I want to do is search through each line and
> fine the line who's $site_id is equal too
> $q->param('username'); if it is then I need to store
> each
>
> ---CODE---
> $name, $site, $site_id, $des, $email, $pass
> -END CODE-
>
> In $user{'name'}, $user{'site'}, $user{'site_id'}
> Get what I mean, if you don't explain
>
> =====
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> 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]