http://qs321.pair.com?node_id=11142930


in reply to To read files from two dir

Hi Pragovnj,

Will there be only one additional source? If so, the easiest way would be to duplicate the code accessing the directory ...

# original part my $SRC_DIR = "EDS/CUCP/SIP"; # put real path h +ere my $DST_DIR = "EDS/CUCP/SIP"; # put real path h +ere ... all the code working on that directories # copy $SRC_DIR = "EDS/CUCP/SIP2"; # put real path +here $DST_DIR = "EDS/CUCP/SIP2"; # put real path +here ... copy of all the code working on that directories

Of course code duplication is usually a bad idea (if you need to change something, that change needs to be done in all copies), so use it carefully. Especially, if you forsee the requirement to have more than two sources in the future.

HTH, Rata