This is fantastic! Although my output looks like its only showing me the final sub-folder's lines. I actually don't need this as each final sub-folder contains just 1 txt file. I want just one level up's directory to check for all sub-directories in that previous directory.
But I'm not seeing this....What am I doing wrong here? $curDir is showing me that final /test/test/BBB directory when I just want /test/test....but I need EVERY sub-folder from the root here of test ....
Could a regular expression help out here to filter out everything after a the last / ?
So I'm seeing this:
/test/test1/bb1' do have the same number of lines
/test/test1/bb2' do have the same number of lines
/test/test1/bb3' do have the same number of lines
/test/test1/bb4' do have the same number of lines
/test/test1/bb5' do have the same number of lines
/test/test1/cc1' do have the same number of lines
/test/test2/cc2' do have the same number of lines
/test/test2/cc3' do have the same number of lines
/test/test2/cc4' do have the same number of lines
/test/test2/cc5' do have the same number of lines
So each folder here has 1 txt file. But I want to see this output instead:
/test/test1' do have the same number of lines
/test/test2' do not have the same number of lines
Or something of the like. I think I see what's happening that curdir is what's screwing this up. I just need this to be one level up and this would work beautiful
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|