I have a directory structure in which i have files like
LEAF.LINUX.LOG
LEAF.SOLARIS.LOG
test.asm
test.qo
Linux_Folder/
SOLARIS_Folder/
in the Linux_Folder(shown above ) again i have some files having same name as parent folder files.like
LEAF.LINUX.LOG
test.qrf
test.lis
similarly in the SOLARIS_Folder(shown above ) again i have some files having same name as parent folder files.like
LEAF.SOLARIS.LOG
test.qrf
test.lis
if i am in Linux_Folder i will look for LEAF_LINUX.log file and use same file from parent folder for doing I/O. similar for other folder. For this i wil try find LEAF*.LOG file in any folder, as there can be many log files in folder. this will give me LEAF_LINUX.log (or LEAF_SOLARIS.log). i tried using grep for LEAF*.log but i am unable to do it . how can i find LEAF*.log file and store it in a variable for future use.

In reply to find a file in directory and do file processing by Anonymous Monk

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.