On May 31, 2011 2:16 AM, "Agnello George" <agnello.dso...@gmail.com> wrote: > > HI > > > i am given ever day a list of files which i wget within a parent folder . > > my team gives me a structure where theses files are located > > ================ > cat /home/upload_files1.txt > download the files form wget http://localserver/website1 and upload on > http://prodserver/weebsite1 > > index.php > dualfilder/dual.templ dual_2.templ > go/go.php > go/numbers/123.php > data/data.php > =============== >
If this file is created by hand, you'll have some fun (sarc). It looks like you're given a download and upload uri. Are you going to assume they'll both always be present or not? > > using the above data given to me i check whether the files exist and if > they do i download them > [Snip] > > i need to create a tar of this in the same given format > > index.php > dualfilder/dual.templ dual_2.templ > go/go.php > go/numbers/123.php > data/data.php > > > i cant seem to come up with a a logic on how to get this done .. can some > one help me kick start a idea on how to preceded . > I don't see much (complex) logic needed here. Just figure what format your input should be, read in the variables, go. To get the pages try LWP::Simple. I'm sure there's a module to tar for you. However if there's not it shouldn't be hard for you to make a good enough module of your own for tar.