Thanks Michael,
NP. your post made the merge run about 60x faster. :)
Maybe you can help on this too. Now I have a list of files in FileInventory.log, I need to compare that to another file list and then show what is in one and not the other. Right now I am putting the differences into an...
Hey Kevin,
I am having issues printing to a file from @missing. Here is what I have, what am I missing?
$workingdir = "c:\\tmp";
open (FILE, "$workingdir\\MissingFiles.txt") or die "$!";
print FILE "$_\n" for @missing;
close (FILE);
Thanks,
- C
My bad .. that works great. Thanks a ton!!
#!C:\Perl\bin\perl.exe
#Working Directory
$workingdir = "c:\\tmp";
#Log Files
$logfile = "test1.log";
$logfile2 = "test2.log";
open (O, ">>$workingdir\\$logfile");
select (O); $| = 1;
open (D, "$workingdir\\$logfile2");
print O <D>;
close (O);
close...
hmm... maybe I am not getting what you wrote, but it isn't working for me. First, I am guessing you meant to have another quote at the end of firstfile.log:
open(O, ">> firstfile.log");
But even then, nothing gets appended to firstfile.log. What am I missing?
Thanks,
- C
Hello,
I have two questions. The first is pretty easy: How can I make a perl script an executable file for windows so that I wouldn't need to install perl on the computer the script is going to be run?
Second, I need to merge two files together (append). One is pretty large (36 MB) and the...
Hello,
I am trying to get a file listing of a directory on a remote server. Right now I am using File::Find:name, which works great on the local computer, but always produces an error message for each file it lists on the remote server. I don't have the error message in front of me, but it says...
Thanks Kevin!!! Perfect! I guess I need to look at "my" a little closer and get a better understanding of it. It seems that has been the solution to my prayers.
- C
KevinADC,
Thanks! That worked really well.
One last question on this part. In the second while loop I would like to save the output to another variable or even a file. However, everytime I try, it either outputs only the last test which didn't exist or nothing at all. I have been trying to...
Thanks for the response. Yes, the OS is my big issue; I can think about how to do this in Linux or Solaris in a heartbeat, however, this is Windows 2000. :( So, I guess I didn't state it, but I would have to use the grep module:
use File::Grep;
So, yes, if I can sort both text files so they...
Hello,
I am running into a little issue. What I am trying to accomplish is to compare two files and find which lines don't match. The problem is that the lines may not be in the same order. And the files may be too big for an array (not sure).
Basically:
## Some command outputs...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.