If we want to discuss ur coding style, I can see a few things I'd like to point out:

when you open the file, it's good that you are checking for success, but since you're using or and not || you can drop the parens, and consider NOT hardcoding the filename in the statement:

$domainsfile = 'authoriseddomains.txt'; open DOM, $domainsfile or die "Can't open authoriseddomains.txt: $!\n" +;

proper indentation of your code will help you track bugs; if you do this, you will find an un-nessecary empty code block inside the first if

Then there's the error message, you are using this in a CGI script, so a great chance you are calling CGI.pm, so why not use it to print out the HTML nicely?

and one more thing about structure; if you move the error checking if ($sonuc != 1) code block after you close DOM you wouldn't need to run through it in every iteration.

just my 2 cents worth of blabering.


He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/

In reply to Re: Script protector from a 'very' newbie.. by Chady
in thread Script protector from a 'very' newbie.. by modabasi

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.