No this won't work. It does not compile for a start but (to your credit) it looks like you have taken the time to do some reading and presented some code so you will now find help is forthcoming :-)

Here is some code to explain sort to you

#!/usr/bin/perl use strict; @a = qw(z x c v b n m); # make a little array sort @a; # sorts @a but result discarded! print "@a\n"; # thus @a not sorted here. Here's why: print sort @a; # prints the sorted @a array print "\n@a\n"; # damn, still not stored sorted though! @a = sort @a; # assigns sorted result to @a print "@a\n"; # as @a now contains sorted result... # this works!

Questions. As you mantion Win2000 I presume you using Win32 (Windows 95/98/ME/NT/2000) to develop your code. If not what are you using? Do you have perl installed, and if so which distribution? -> ie ActiveState perl. If you have ActiveState perl use explorer to go to c:\perl\html\index.html and click-click -> this is the Perldoc. Are the spaces in the file names real? Spaces are non portable (ie most operating systems except Win32 don't like them - it is better_to_use_an_char_to_separate_your_words_to_make_the_filenames_easier_to_read. What do the xxxxx represent. Are they letters, numbers, spaces, _ chars, other characters (ie .) or some mix of these. Which mix?

Post the answers and then we can look at achieving your goal in a step by step manner.

tachyon


In reply to Re: A monk in training with a problem by tachyon
in thread A monk in training with a problem by wiz

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.