Hey, i havent done much programming of perl in a website but i need to do this...
Basically its to check if a user has got any of the mirrors added... I've already done the bit where i write the users to a database (txt files ) but not i need to check against it....
i've come up with this script:
Code:
my $email = shift;<br /><br />my $added;<br />my @handles = <./lists/*.txt>;<br />foreach my $handle (@handles){<br /> open(TXT, $handle);<br /> @users = <TXT>;<br /> close TXT;<br /><br /> foreach my $user (@users){<br /> if($user eq $email){<br /> $added = $handle;<br /> }<br /> }<br /> last if defined $added;<br />}<br />if(!defined $added){<br /> $added = "You have not got a mirror added! Add one....";<br />}<br /><br />return $added;<br />
Is that ok?
anyway, now i need to access this and i want a text box and a submit button that calls that script with $email as the data that was in the txt box....
I then need to somehow display the return, Sombody good with working with perl and web help?