Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: To read files from two dir

by Ratazong (Monsignor)
on Apr 12, 2022 at 07:13 UTC ( #11142930=note: print w/replies, xml ) Need Help??

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11142930]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2023-03-25 13:48 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (63 votes). Check out past polls.