This is really embarrassing. I have just read some of your questions and you people are way out of my league! Hey, I don't even know what the word 'geek' means! Still we all have to start somewhere! I'v just tried my first script for my first page and, surprise surprise, it doesn't work. Could someone take the time to look at it and show me where I am going wrong (or if there's anywhere I'm going right). By the way don't worry about the French/English mix - I live in France and am learning this in French, but write my commentaries in English 'cos I'm lazy!
#!/usr/local/bin/perl # A visit counter ###################################### # Definition of variables # fichierhtml is the file in which the visits are counted # fichiernombre saves the visits ########################################### $ fichiernombre = "/cgi-bin/compteleshits"; ########################################### #First stage : open the file containing the hits to read open(hits,"$fichiernombre"); # Second stage : read the visits and save them in a # new variable $visites=(hits); #Third stage : close the file containing the hits close $fichiernombre #Fourth stage : open the file containing the hits for writing open(hits,">$fichiernombre "); #Fifth stage : increase by 1 the variables which contain #the visits made and rewrite them in fichiernombre print hits ++ $visites; #Sixth stage : close the file containing the visits close %

In reply to Hit Counter by anmaco

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.