Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    General Discussion    Chit - Chat  ›  Perl Help?
Users Browsing Forum
MSN Bot and 2 Guests

Perl Help?  This thread currently has 441 views. Print
1 Pages 1 Recommend Thread
tylermenezes
January 6, 2007, 12:26am Report to Moderator Report to Moderator

Anybody here speak Python? HHHSSSSSSSSSSSSSS!
Posts: 201
Gender: Male
Posts Per Day: 0.21
Reputation: 90.48%
Reputation Score: +19 / -2
Time Online: 1 days 5 hours 56 minutes
Location: Redmond, Washington
Age: 16
Can somebody help me with PERL? I'm working on a voting system for a member of MyWebs, and I need to allow members to vote only once. I'm using IPs for this. After each vote, I append the IP address to a file, and then record the vote. The next time, it's supposed to use regex to search for the same IP address, and if it exists, refuse the vote. Here's the code I'm using:

Code
open(IPS,"$openlk") or die "$!";
$ips = <IPS3>;
close (IPS3);

if($ips =~ /$ENV{REMOTE_ADDR}/i){
error('You can\'t vote twice!');
}else{
open(IPS3,">>$openlk") or die "$!";
print IPS3 "$ENV{REMOTE_ADDR}|";
close (IPS3);
}


Every time it just lets the visitor through. Could someone tell me what's going wrong here? Thanks!


Logged Offline
Site Site Private Message Private message
Martin
January 6, 2007, 4:52am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 4,558
Gender: Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 26 minutes
Location: UK
Age: 50
I could help but I would need the full code not just a snippet.
If want me to look I will pm you my email address.



Martin's Reputation: Increase
Logged Offline
Site Site Private Message Private message Reply: 1 - 3
tylermenezes
January 6, 2007, 1:50pm Report to Moderator Report to Moderator

Anybody here speak Python? HHHSSSSSSSSSSSSSS!
Posts: 201
Gender: Male
Posts Per Day: 0.21
Reputation: 90.48%
Reputation Score: +19 / -2
Time Online: 1 days 5 hours 56 minutes
Location: Redmond, Washington
Age: 16
Here's the code:



This post contains attachments; to download them you must login.



Logged Offline
Site Site Private Message Private message Reply: 2 - 3
Martin
January 6, 2007, 2:32pm Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 4,558
Gender: Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 26 minutes
Location: UK
Age: 50
I need all of it, html etc etc so I can test it. At the moment all I get is a page that says "You are missing some information"

I have pm'd you my email address.



Martin's Reputation: Increase
Logged Offline
Site Site Private Message Private message Reply: 3 - 3
1 Pages 1 Recommend Thread
Print

E-Blah Community    General Discussion    Chit - Chat  ›  Perl Help?