Tag Archives: perl code

Perl – Uppercase to Lowercase Conversion via the Translation Operator

Perl’s translation operator provides a way to substitute one group of characters for another. In the below script I demonstrate how easy it is to use the translation operator to convert standard input from the command prompt from uppercase letters … Continue reading

Posted in Perl, Programming Languages, Technology | Tagged , , , , , , , , , , , , | Leave a comment

Perl – merging files

Below I demonstrate a quick method of merging two files into a third file using Perl. The program merges two files together into a third file by writing one line from file one to file three and then writing one … Continue reading

Posted in Perl, Programming Languages | Tagged , , , , , | Leave a comment

Use Perl’s regex to count the # of words in a file

In the below code I use Perl’s regex capabilites to count the # of words in a file. Notice I used “\s” in the regex expression to account for not only spaces but also tab and new line characters. In … Continue reading

Posted in Perl, Programming Languages | Tagged , , , , , , , , , , , , , , , , , | Leave a comment