in reply to Zipped problem !

Ok, im not really sure what you are asking, and its a little hard to tell whats going on here. I suggest you rework your code a little and try to absorb some advice:

Here $temp_var1,$temp_var2,$temp_var3 are the MD5 values of a file with same name existing in main , second and third folders respectively

Ok, id like to ask you some questions: if you can write the above line then why are the variables so poorly named? Why aren't they named $md5_main, $md5_second, and $md5_third, or even possibly @md5[0..2] Next you get an external process to pipe to a file that you then open and read, why don't you just get the external process to perl using open and then read its output directly? Other issues come up, whats $v1? Whats $file1 and $file2? What do you think if(($file1 eq $file2) =~(/.zip/i)){ does?

A lot of this is just sloppyness, $v1 is an error flag? And I need to read your text to see that?

Lastly your indentation is pretty bad. You need to clean it up. Go and have a look at any of the posted code by folks like tye or tilly or dws or theorbtwo or BrowserUk or so on and youll see that they all use some form of consistant easy to read indentation and style. Pick the features of them all you like and then use it rigiorously. The indentation of a code gives it life and form making it flow like a poem, minimizing line lengths and using descriptive variable names makes it easier to userstand. Imagine a play like Hamlet where every characters name was replaced by $temp_char, $royal1,$royal2, $soldier, etc. Would you have any idea what was going on past the first or second act? Would the actors even be able to keep their own lines straight?

The point here, is that im betting that if you actually reworked this code so it was readable the "error" would magically disappear. It would just be totally obvious as you reworked things what was going on and why.

Please dont be discouraged by this reply. But please do try to learn from it. Good luck.

---
demerphq

Replies are listed 'Best First'.
Re^2: Zipped problem !
by prad_intel (Monk) on Feb 04, 2005 at 10:31 UTC
    Hi demerphq,

    I am not discouraged about your comments,infact I have taken it positively.

    The best way to learn a thing and become best is to have a best teacher ( or monk ) and tats the reason i joined this group.

    All comments are welcomed.

    I have learnt a lot from perlmonks.org and I am doing better day by day and I am sure within a few months I shall be competitive to bart , corion and others

    I shall take your comments and integrate it and shall re-post once things are per your expectation.

    Every bubble grows to finally burst but knowledge is the only bubble which gets stability as it grows...

    I am a pupil to all those monks and saints here

    Prad