473,396 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Covert html to HTML

2
Hi there
can any one help me I would like to make a perl script to make me convert a file with html tags form lowercase to uppercase from a file .html
Jul 27 '08 #1
4 1249
numberwhun
3,509 Expert Mod 2GB
Ok, why not post the code you have tried here and we will help you get it working. But, you have to make an effort as this is not a coding service. Also, please surround your code with the proper code tags.

Regards,

Jeff
Jul 27 '08 #2
KevinADC
4,059 Expert 2GB
sounds like school work. This is one of the basic assignments of many a perl course.
Jul 27 '08 #3
ouse77
2
i tried this but id don's not work

Expand|Select|Wrap|Line Numbers
  1. while ($a= <STDIN>)
  2. {
  3. if ($a =~ tr/a-z/A-Z)
  4. {
  5. print "$a\n";
  6. }
  7. if ($a =~ tr/A-Z/a-z/)
  8. {
  9.    print"the uppercase is $a\n";
  10. }
  11.    elsif ($a =~ tr/[A-Z]/[a-z]/)
  12. {
  13.  $b=$a;
  14.  $b=~tr/a-z/A-Z/c;
  15.  print "$b\n";
  16. }
  17. }
Aug 4 '08 #4
nithinpes
410 Expert 256MB
i tried this but id don's not work

Expand|Select|Wrap|Line Numbers
  1. while ($a= <STDIN>)
  2. {
  3. if ($a =~ tr/a-z/A-Z)
  4. {
  5. print "$a\n";
  6. }
  7. if ($a =~ tr/A-Z/a-z/)
  8. {
  9.    print"the uppercase is $a\n";
  10. }
  11.    elsif ($a =~ tr/[A-Z]/[a-z]/)
  12. {
  13.  $b=$a;
  14.  $b=~tr/a-z/A-Z/c;
  15.  print "$b\n";
  16. }
  17. }

You have tried to translate lower case characters to uppercase and then back to lowercase and further UC to LC multiple times. I am confused about your objective!!
The very first expresssion that you have used in if loop (note the missing forward slash'/') will translate all lower case characters to upper case.
Expand|Select|Wrap|Line Numbers
  1. $a =~ tr/a-z/A-Z/ ;
  2.  
What you are confused with is probably the wrong print statement in second if loop. It should be - "the lowercase is $a\n".
Aug 5 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Philip Mette | last post by:
I am in a crunch and need to covert this Oracle statement to MSSQL. Is there any Oracle/MSSQL experts out there that can help me? I do not understand the syntax enough to modify this. Thanks so...
3
by: Cindy Liu | last post by:
Hi Everyone, In .Net we have XmlSerializer to convert c# class to xml, or vice versa. Do we have any APIs to convert c# class to XSD? Thanks in advance, Cindy
13
by: Ray Z | last post by:
So far, I get the idea that if I want to use both the unmanaged and managed memory, I can not avoid memory copy. But I DO need to avoid it. I get a idea that maybe I could use "union" to convert...
7
by: Big Dave | last post by:
I'm going insane!!!!! I set a font color using documentDOTexecuteCommand("ForeColor"). That works, but now I'm trying to read the color in another method. I used...
4
by: Jim Florence | last post by:
Hello, I've just started in ASP and I'm having a few teething problems. Initially I tried to write out dates from the database using <asp:Label runat="server" ID="Label6" Text='<%#...
3
by: ad | last post by:
I use a fileUpload of ASP.NET to read a csv file from client into a Strem like: Stream myStream = FileUpload1.FileContent; But the file from Client if of CharSet BIG5. How can I covert it to...
6
by: Calros Lo | last post by:
Dear all: I develop a programe that need when I get a string , such as "123" or "ABC",if I get string "123" and the system will help me to create new string "124" , if I get string "ABC" and the...
21
by: Wisdo | last post by:
Hi All, char to char ** is compile error. why? if i hava a string array. yes. it's not safe and it's better to use vector<stringinstead. but my point is the language feature. char...
6
by: =?Utf-8?B?dmluY2VudA==?= | last post by:
Is there any method to covert a pdf file into jpg file in c#? Many thanks for your replying.
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.