Hi, thanks for the reply! So, the variable $confs is my numbered chemical conformations, in the form of 4 characters long in the style of B001, B002, B003 and so on. They are in my filenames along with other similar ones. The result is something like MOLEC1-B001-OPT-FREQ2.gout or MOLEC2-B010-OPT-FREQ2.gout or MOLEC8-B040-OPT-FREQ2.gout and so on. Does that make sense? I don't know how many conformations I'll get in the end, as I'm optimising my molecules now. I don't know if I've managed to explain it at all... In my case I don't think split would be useful, on the other hand I'm learning so I may be wrong.

edit: You're right that the array @confs isn't populated correctly. I print its contents and there's only one file that it finds, when I have 5 of them in the directory. So I have to find a way to put all elements in the array and not only one.


In reply to Re^5: create array of empty files and then match filenames by angela2
in thread create array of empty files and then match filenames by angela2

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.