codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Help please.  Bern at 09:03 on Monday, December 11, 2006
 

Hello all,

I've only got a basic knowledge of perl so I'm hoping someone might be able to help me with a script I need.

I need a perl script that prompts the user to enter the name of a HTML file. The file will need verifying to check that the file extenstion is .html or .htm (upper case or lower case is fine).

Upon input of the validated name the file needs to be processed and all lowercase tage, e.g (<html>) need converting to uppercase (<HTML>), no other text should be converted and also tag attribute values need to remain, e.g (<img src="/forum/picture.jpg"> should convert to <IMG SRC="/forum/picture.jpg"> and not <IMG SRC="PICTURE.JPG">.

At the end of the processing, the original file needs to be renamed with the .old extension instead of .htm or .html and the processed file should be given the original file name.

Any help would be appreciated.

  Re: Help please.  mmarab at 08:24 on Monday, December 18, 2006
 

Hi,

everything you are looking for will be available on google. You can check the file extension by using a simple regular expression.

But i think it would benifit you more if you used google to search for the different elements, get them to work individually and then integrate it together. This way you will learn how each part works.
Rather than someone writing the code for you.

Hope this helps.

Marcello.








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: What is This?
•  logging console output of stored procedure to file
•  Re: need help!!!
•  Connecting to an https server using NNTP perl
•  Is there an ADMIN!!!!! Is this place maintained!
•  small question
•  Re: Text to Speech Converter
•  Re: Multithreading question
•  Re: This forum sucks.


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2006