![]() |
|
Perl Monk, Perl Meditation | |
PerlMonks |
Split Helpby keeper12 (Novice) |
on May 11, 2010 at 07:28 UTC ( #839384=perlquestion: print w/replies, xml ) | Need Help?? |
keeper12 has asked for the wisdom of the Perl Monks concerning the following question:
I have a project in which i have to download a few files using a perl script and then mail it. For Emailing the File i am using Email::Send and Email::MIME. The script is more or less ready, but i have a small problem.
The URLs are specified in a text file.
The problem is that every time i download a file, i have to specify the name by which it is to be saved along with the URL. What I want to do is that whenever a file is to be downloaded, the name should be extracted from the URL only.
e.g. if URL is www.abcd.com/search or www.efgh.in#found The file should be saved by the name of (www.abcd.com.ppt) or (www.efgh.in.doc) The code is posted below. Please help me out.
Here I was manually specifying the Name along with the text file. I found out that I can use Split. But being a newbie to perl programming, could not understand it properly.
Back to
Seekers of Perl Wisdom
|
|