Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
My question is HOW am i suppose to identify each and every html webpage i have, without the need of editing and embedding a string containing a number for them.

The full pathname of each file is already a unique identifier, why do you need a number also?

Converting the unique name to a unique number can be done in any number of ways:

  • Put a list of all the paths into a file and then number them;
  • On *nix, the node id should be unique;
  • md5 the path;
  • crc64 the path;
  • A custom hashing function:
    sub id{ my $n = 0; $n = ( $n << 1 ^ $_ ) for unpack 'Q(X7Q)*', $_[0]; +$n };; print id( $_ ), ' : ', $_ for qw[ /home/nikos/public_html/folder/subfolder/index2.html /home/nikos/public_html/folder/subfoldre/index2.html /homa/nikos/public_html/folder/subfolder/index2.html /home/nikos/public_html/folder/subfoldre/index.html /home/nikos/public_html/folder/subfolder/index.html ];; 14395874431259872676 : /home/nikos/public_html/folder/subfolder/inde +x2.html 18362554206005274164 : /home/nikos/public_html/folder/subfoldre/inde +x2.html 14252040718160727460 : /homa/nikos/public_html/folder/subfolder/inde +x2.html 534634562378736008 : /home/nikos/public_html/folder/subfoldre/index. +html 2010048469067125824 : /home/nikos/public_html/folder/subfolder/index +.html

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

In reply to Re: Uniquely identifying each & every html template by BrowserUk
in thread Uniquely identifying each & every html template by Nik

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (5)
    As of 2018-05-20 20:10 GMT
    Find Nodes?
      Voting Booth?