"Let me know if you have questions or need clarifications."

Well, I've already done that but you haven't responded yet.

I asked you to try some print statements; I even provided sample code. Did you do this? What was the result?

I asked about which variable was supposed to hold 001. You haven't told us.

[Separate issue.] Your output is dependent on user input. You don't show what that user input is.

"and output from the above script looks like this"

No, that's not possible! Look at this line:

print OUT $pref . $number . "," . $prodvolumename . ",$tiffpath\\$pref +$number.tif,";

How can this concatenation

$pref . $number

produce

þHJH1411255

when the same concatenation (albeit coded slightly differently)

$pref$number

produces

HJH1411255

Where did that thorn character come from in the first instance; or, conversely, how did it disappear in the second instance?

Either that's not the output you're getting or you're running different code to what you posted.

All I can do now is make guesses! Maybe the user isn't including 001 when entering $tiffpath. Maybe your code doesn't generate 001 for the output. Maybe something else.

-- Ken


In reply to Re^3: Traverse directory backwards based on file by kcott
in thread Traverse directory backwards based on file by subhash1198

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.