Dear Holy Monks of Perl,
I am having a lot of problems trying to compare 2 C files.
firstly let me show you the 2 files:
<Text1.c>
checkeof
GetFile
<stub.c>
GetFile
SerialWaitForChar
strcpy
checkeof
DownloadImg
What i need to do is to remove all occurances in Text1.c from stub1.c. But I keep getting what I had in stub.c.<\p>
I think maybe it because of the hash that i am using. The code that i am using is as follows:
%hash2;
$done;
open (Global, "text1.c")
for $fish(test1){
open (Local, "stub.c") or die "Can't open stub.c :$!\n";
for $local(<Local>){
$local =~ s/\n//;
unless ($fish eq $local){
$hash2{$local}++;
}
close Local;
}
}
foreach $done ( keys %hash2){
print "$done";
}
So is there anyway for me to rectify this?? Thanks in adavnce!!!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.