acupuncture alternative herbal medicine

just another regularban.info web blog

MEMBERS:

Using Perl To Convert Hyperlinks And Filenames To Lowercase

Like a lot of web developers, I'm not always that disciplined when it comes to the file naming convention I use and I sometimes end up with a situation whereby I have some files that are in lowercase, some that begin with a capital, and some that are a bit of a mixture.

One web site I maintain contains about 2000 web pages and has about 20,000 hyperlinks. As you can imagine, I had one of those sinking feelings when I was told that in order to migrate the web site to a new content management system, all the file names and hyperlinks would need to be changed to lowercase.

Whenever I am presented with a problem like this, my instinct is always to write a Perl script using one or more regular expressions to solve the problem. This particular situation was no exception.

Change a string to lowercase

The following regular expression changes all the characters in a string to lowercase. The first part of the regular expression finds a hyperlink, and the second part converts the string. (Just in case this article is not displayed correctly, there should be a single backslash in front of the 'L$1').

1. $line =~ s/<a href="(.*?)"/<a href="L$1"/gs;

Change a filename to lowercase

Likewise, changing a filename itself is very simple. The following two lines perform the task quite nicely:

1. use File::Copy; 2. move ("$name", "L$name");

(Again, there should be a single backslash in front of the 'L$name'.)

If you need more information on how to incorporate the above code snippets into a complete script, feel free to contact me directly.

About the Author: John Dixon is a freelance web developer working for My Health Questions Matter, a company that helps users of the health service to ask the right questions in their dealings with health professionals.

John is also interested in computer history and maintains a Computer History web site.

Through his own company John Dixon Technology Ltd, John does web development work for various companies.

 


Beta - A Programming Language

BETA is a pure object oriented programming language developed by Scandinavian School in System Development, Nordic Universities.

This was released after a series of enhancements of their first object oriented language SimulaI which was a simulation language. Soon it was generalized into Simula67 which had the object oriented framework, and worked on the concepts of class, sub-class, virtual functions etc. This was enhanced by another object oriented language Delta that worked for system description; this meant it could express predicate logic and state changes. This was a non-executable effort and thus did not qualify as a language. So it was decided to design a programming language Gamma that works as Delta but is executable.

Eventually, Gamma was never made, rather Beta was made. While Beta was being made, it was realized that Beta was much more powerful than what Gamma would be or ever could be. Beta is a programming language like C++.

Currently, BETA is available on UNIX workstations, on PowerPC Macintosh and on Intel-based PCs. BETA has an optimum balance between compile time checking and run time checking. The type cast checking is done at compile time, however, for the entire set of type check and type conversion to be done at compile time requires a lot of time and thus increases the complexity of a program. Thus, an optimum balance has been made.

BETA is a logical description of the language. It works on the concepts of class, sub-class, virtual functions etc. It also contains transient variables, ones whose scope is program execution, and persistent variables, those whose values are retained in the disk space and are available at the time of next execution.

Read more articles about Web Development http://www.iWebDevs.net

Tarang Bhargava is the CEO of Vexat Inc. and has an affiliate marketing experience of six years. The website http://www.earncashonline.in is Affiliate Marketing invitation that provides an opportunity to Indians to make money through internet using his experience.

Read articles by him at http://www.ArticlesDirectory.in

Tarang Bhargava - EzineArticles Expert Author

 


A Storage Server Solution

Rack mount servers are essentially systems that are in a modern server and are used to mount different sizes and kinds of electronic modules. Rack mount servers would be ideal for individuals who need to set or probably pack a couple of personal computers to a smaller space.

This kind of server is commonly employed in many areas and countries globally for a lot of purposes and reasons. Rack mount servers are used wherever an application of computers has to be used for a wider and larger application, which could star t from video editing suites to computer animations to the other kinds of three-dimensional tasks.

These rack mount servers are also utilized for the installation of different Internet service providers or ISPs in the field of telecommunications as well as in the other types of communication and for different database houses. They are created and are designed to be able to fit in an open PC or probably in a closed cabinet. One advantage for the use and implementation of a rack mount server would be that they could really prove to be very functional and useful if someone needs or wants to save some space. The space-saving design of rack mount servers allows the user to maximize the space he or she has.

The role of these servers is crucial, as proper and adequate setting and support of hardware to a well-built storage space would ensure that they are would be well-protected from any external elements and other factors.

Want to buy your own dedicated servers for cheap?
Read more about web hosting servers or use a coupon code to signup with a discounted server from hostgator

 


Pages 
* About

Archives
    * February 2008
    * January 2008

Categories:
* Uncategorized

Last Updated:

regularban.info is proudly powered by WordPress MU running on  regularban.info.
Create a new blog and join in the fun!
Entries (RSS) and Comments (RSS).