No such thing as a small change | |
PerlMonks |
Re: comparing files after FTPby demerphq (Chancellor) |
on Oct 15, 2003 at 23:41 UTC ( [id://299593]=note: print w/replies, xml ) | Need Help?? |
Id just like to point out that this is some scary code. Duplication like you have in that first section just screams out "refactor me!" You should convert as much of that into a subroutine, and then call it twice with the appropriate values. A perfect example of why you should do this are the following two lines
while you were cutting an pasting you forgot to change the second error condition from $s_ftp to $d_ftp. If I were writing it the code would probably look something like this:
(Yes I know this doesnt address your real question. But this is also good advice. :-)
---
demerphq First they ignore you, then they laugh at you, then they fight you, then you win.
In Section
Seekers of Perl Wisdom
|
|