<?xml version="1.0" encoding="iso-8859-1"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
<title>Programming Basics - Web Developer Tutorials</title>
<link>http://www.codewalkers.com</link>
<!-- PubSubHubbub Discovery -->
<link rel="hub"  href="http://devshednet.superfeedr.com/" xmlns="http://www.w3.org/2005/Atom" />
<link rel="self" href="http://www.codewalkers.com/rss-feeds-1.xml" xmlns="http://www.w3.org/2005/Atom" />
<!-- End Of PubSubHubbub Discovery -->
<atom:link href="http://www.codewalkers.com/rss-feeds-1.xml" rel="self"/>
<description>Programming Basics Tutorials at Code Walkers.  Code Walkers is a community focused on beginner, intermediate and advanced tutorials in PHP, MySQL, PECL and other Open Source Web technologies.</description>
<language>en-us</language>
<lastBuildDate>Wed, 16 May 2012 17:10:45 -0400</lastBuildDate>
<pubDate>Wed, 16 May 2012 17:10:45 -0400</pubDate>
<item><title>The Transliteration Operator in Perl</title>
<pubDate>Wed, 02 May 2012 08:00:03 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/The-Transliteration-Operator-in-Perl/</link>
		<description><![CDATA[In this third part of a three-part article series on string processing in Perl, you will learn how to use the transliteration operator. This article is excerpted from chapter nine of  the book  Beginning Perl, Second Edition, written by James Lee (Apress;  ISBN-10: 159059391X).]]></description>
		<content:encoded><![CDATA[Transliteration  Now let's look at another text processing operator-the transliteration operator. Its syntax is   tr/old/new/   This operator resembles the substitute operator, s/// , that we saw in Chapter 7 when we discussed regular expressions. While the tr/// operator resembles s/// , the only thing it has in common with the substitute is that both operators operate on $_ by default. The tr/// operator has nothing to do with regular expressions.  What this operator does is to correlate the characters in its two arguments, one by one, and use these pairings to substitute individual characte...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/The-Transliteration-Operator-in-Perl/</guid>
</item>
<item><title>Perl String Processing Functions</title>
<pubDate>Wed, 25 Apr 2012 08:00:25 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Perl-String-Processing-Functions/</link>
		<description><![CDATA[In this second part of a three-part article series on string processing in Perl, you will learn about the rindex() and substr() functions. This article is excerpted from, teh book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN-10: 159059391X)]]></description>
		<content:encoded><![CDATA[The rindex() Function  The rindex() function is similar to index() except that it searches the string from right to left (instead of left to right). The syntax is similar:  rindex(string, substring)   This function searches right-to-left through the string searching for the substring. It returns the 0-based index of where the substring is in the string, or -1 if the substring is not found.  An important note: even though this function searches through the string from right to left, the 0th character of the string is still the left-most character.  This invocation:   rindex('David Gilmour', 'i'...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Perl-String-Processing-Functions/</guid>
</item>
<item><title>Perl String Processing</title>
<pubDate>Wed, 18 Apr 2012 12:00:05 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Perl-String-Processing/</link>
		<description><![CDATA[If you're learning how to use Perl, you may already be aware of its power as a text processing language. It gets that power in a number of ways, not the least of which is its built-in string operators and string functions. This three-part article series will show you some of the many ways in which you can process strings in Perl. It is excerpted from chapter nine of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Perl was created to be a text processing language, and it is arguably the most powerful text processing language around. One way that Perl displays its power in processing text is through its built-in regular expression support that we discussed in Chapter 7. Perl also has many built-in string operators (such as the string concatenation operator . and the string replication operator x ) and string functions. In this chapter we will explore several string functions and one very helpful string operator.  Character Position  Before we get started with some of Perl's built-in functions, we should ...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Perl-String-Processing/</guid>
</item>
<item><title>Control Flow Constructs: Loops Conclusion</title>
<pubDate>Wed, 04 Apr 2012 15:30:05 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Control-Flow-Constructs-Loops-Conclusion/</link>
		<description><![CDATA[In this conclusion to a nine-part  article series on Perl  control flow constructs,  you'll learn about the the next function and how to re-execute a loop. This article is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Going On to the Next  If you want to skip the rest of the processing of the body, but don't want to exit the loop, you can use next  to immediately go execute the next iteration of the loop by testing the expres sion. Here is an example of a program that reads input from the user, and if the line of input is not blank, the line is printed. It the line is blank, then we immediately go back to read the next line:    #!/usr/bin/perl - w # next1.pl  use strict;  print  quot;Please enter some text:\n quot;; while ( lt;STDIN gt;)    chomp; print  quot;You entered: [$_]\n quot;; }   Here is an exampl...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Control-Flow-Constructs-Loops-Conclusion/</guid>
</item>
<item><title>Loop Control Constructs</title>
<pubDate>Wed, 28 Mar 2012 08:00:05 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Loop-Control-Constructs/</link>
		<description><![CDATA[In this eighth part of a nine-part article series on control flow structures in Perl, you'll learn how to modify expressions with  quot;while quot; and how to create loop control constructs. This article is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Expression Modifying   As before, you can use while as a statement modifier. Following the pattern for if , here's what you'd do with while :   while ( condition )     becomes   statement while condition;   Similarly:   until ( condition )     becomes   statement until condition;   Therefore, this loop:   while ( lt;STDIN gt;)     can be written as   print  quot;You entered: $_ quot; while  lt;STDIN gt;;     Perl provides constructs to allow us to control the flow of our loops. They allow us to break out of a loop, go to the next iteration of the loop, or reexecute the loop. We'll start with b...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Loop-Control-Constructs/</guid>
</item>
<item><title>Control Flow Constructs: the For and Foreach Loops</title>
<pubDate>Wed, 21 Mar 2012 08:00:05 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Control-Flow-Constructs-the-For-and-Foreach-Loops/</link>
		<description><![CDATA[In this seventh part of a   nine-part article series on the variety of control structures Perl programmers can use to set up the way a program gets to where it's going, we'll continue our study of loops with the for loop and the foreach loop. This article is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[The for Loop  Perl has a for loop, similar to the one found in C/C++/Java. Its syntax is    for (init_expr; test_expr; step_expr)     The init_expr is done first and once. Then the test_expr is tested to be true or false. If true, the action is executed, then the step_expr is executed. Then the test_expr is tested to be true or false, etc.  The most common use of a for loop is as an alternative way of writing a while loop that might resemble this one:   $i = 1;  while ($i  lt;= 5)     This can be written in a for loop as   for ($i = 1; $i  lt;= 5; $i++)       Perl has another loop called the f...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Control-Flow-Constructs-the-For-and-Foreach-Loops/</guid>
</item>
<item><title>Loops and Control Flow Constructs</title>
<pubDate>Wed, 14 Mar 2012 08:00:04 -0400</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Loops-and-Control-Flow-Constructs/</link>
		<description><![CDATA[In this sixth part of a nine-part series on Perl control flow structures, we continue our study of loops. This article is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Infinite Loops  The important but obvious point is that what we're testing gets changed inside the loop. If our condition is always going to give a true result, we have ourselves an infinite loop. Let's just remove the second of those two statements:  #!/usr/bin/perl -w # while3.pl  use strict;  my $countdown = 5;  while ($countdown  gt; 0)    $countdown never changes. It's always going to be 5, and 5 is, we hope, always going to be more than 0. So this program will keep printing its message until you interrupt it by holding down Ctrl and C. Hopefully, you can see why you need to ensure that w...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Loops-and-Control-Flow-Constructs/</guid>
</item>
<item><title>Expression Modifiers for Perl Control Flow Constructs</title>
<pubDate>Wed, 07 Mar 2012 08:00:05 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Expression-Modifiers-for-Perl-Control-Flow-Constructs/</link>
		<description><![CDATA[In this fifth part of a nine-part article series on Perl control structures, you'll learn about expression modifiers, looping statements, and more.  This article is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[The unless Statement  There's another way of saying if (not $a) . As always in Perl, there's more than one way to do it.2 Some people prefer to think  If this is not true, then   ,  but other people think  Unless this is true, then   .   Perl caters to both sets of thought patterns, and we could just as easily have written this:   unless ($a)     The psychology is different, but the effect is the same. We'll see later how Perl provides a few alternatives for these control structures to help them more effectively fit the way you think.  Expression Modifiers  When we're talking in English, it's ...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Expression-Modifiers-for-Perl-Control-Flow-Constructs/</guid>
</item>
<item><title>Logical Operators and Control Flow Constructs</title>
<pubDate>Wed, 29 Feb 2012 08:00:03 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Logical-Operators-and-Control-Flow-Constructs/</link>
		<description><![CDATA[In this fourth part of a  nine-part article series on the variety of control structures Perl programmers can use, we'll take a close look at logical operators.  It is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Logical Operators   We also saw in Chapter 2 that we can join together several tests into one by the use of the logical operators. Table 3-3 provides a summary of those.  Table 3-3. Logical Operators       Operator   Description    $x and $y   True if both $x and $y are true    $x  amp; amp; $y      $x or $y   True if either of $x or $y, or both are true    $x || $y      not $x   True if $x is not true    ! $x     The operators and , or , and not are usually used instead of  amp; amp; , || , and ! mainly due to their readability. The operator not  means not, after all. Don't forget there is a ...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Logical-Operators-and-Control-Flow-Constructs/</guid>
</item>
<item><title>Comparing Strings with Control Flow Constructs</title>
<pubDate>Wed, 22 Feb 2012 08:00:05 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Comparing-Strings-with-Control-Flow-Constructs/</link>
		<description><![CDATA[In this third part of a nine-part article series on Perl control structures, we'll examine the operators used ot compare strings.  This article is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Comparing Strings   When we're comparing strings, we use a different set of operators to do the comparisons as listed in Table 3-2.     Table 3-2. String Comparison Operators    Operator  Description    $x gt $y  $x is string greater than $y .    $x lt $y  $x is string less than $y .    $x ge $y  $x is string greater than or equal to $y .    $x le $y  $x is string less than or equal to $y .    $x eq $y  $x is the same as $y .    $x ne $y  $x is not the same as $y .                Here's a very simple way of testing if a user knows a password. Note: don't use a good password in this program sin...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Comparing-Strings-with-Control-Flow-Constructs/</guid>
</item>
<item><title>Perl Operators and Control Flow Constructs</title>
<pubDate>Wed, 15 Feb 2012 08:00:04 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Perl-Operators-and-Control-Flow-Constructs/</link>
		<description><![CDATA[In this second part to a nine-part series on Perl control structures, we'll delve more deeply into operators and take a look at how to compare numbers. It is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Operators Revisited  The if statement, and all the other control structures we're going to visit in this chapter, test to see if a condition is true or false. They do this using the Boolean logic mentioned in Chapter 2, together with Perl's ideas of true and false. To remind you of these:     An empty string,  quot; quot; , is false.    The number 0 and the string  quot;0 quot; are both false.    An empty list, () , is false.    The undefined value is false.    Everything else is true.  However, you need to be careful for a few traps here. A string containing invisible charac ters, like spaces...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Perl-Operators-and-Control-Flow-Constructs/</guid>
</item>
<item><title>Control Flow Constructs</title>
<pubDate>Wed, 08 Feb 2012 08:00:04 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Control-Flow-Constructs/</link>
		<description><![CDATA[This nine-part article series examines the variety of control structures Perl programmers can use to set up the way a program gets to where it's going. It is excerpted from chapter three of the book Beginning Perl, Second Edition, written by James Lee (Apress; ISBN: 159059391X).]]></description>
		<content:encoded><![CDATA[Most of the programs we have seen so far have been very simply structured-they've done one statement after another in turn. If we were to represent statements by boxes, our programs would look like this:   This sort of diagram is called a flow chart, and programmers have used them for a long time to help design their programs. They're considered a bit passÃ© these days, but they're still useful. The path Perl (or any other language) takes by following the arrows is called the flow of execution of the program. Boxes denote statements (or a single group of statements), and diamonds denote tests....]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Control-Flow-Constructs/</guid>
</item>
<item><title>More Time Manipulation with PHP</title>
<pubDate>Wed, 01 Feb 2012 08:00:06 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/More-Time-Manipulation-with-PHP/</link>
		<description><![CDATA[In this conclusion to an eight-part article series on manipulating date and time in programs with PHP, you'll learn how to use the getWeekday() method, the getDayOfYear() method, and many more. This article is excerpted from chapter 12 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[More Manipulation Methods  getWeekday()   integer getWeekday()   The getWeekday() method returns the numerical offset of the day specified by the date object. An example follows:   $date = new Date(); $date- gt;setDMY(30,4,2006); echo $date- gt;getWeekday();   This returns the following, which is a Sunday, because Sunday's numerical offset is 7:  --------------------------------------------7  --------------------------------------------  setToWeekday()   boolean setToWeekday (int weekday, int n [, int month [, int year]])   The setToWeekday() method sets the date to the n th weekday of the mon...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/More-Time-Manipulation-with-PHP/</guid>
</item>
<item><title>Validating and Manipulating Dates with PHP</title>
<pubDate>Wed, 25 Jan 2012 08:00:05 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Validating-and-Manipulating-Dates-with-PHP/</link>
		<description><![CDATA[In this seventh part of an eight-part article series on handling dates and time with PHP, you'll learn how to use the date function's validators, and how to easily manipulate dates. This article is excerpted from chapter 12 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[Validators  Date offers a method for determining whether the date falls on a leap year and a method for validating the date's correctness. Both of those methods are introduced in this section.    isLeap()   boolean isLeap()   The isLeap() method returns TRUE  if the year represented by the date object is a leap year, and FALSE otherwise. The following script uses isLeap() in conjunction with a ternary operator to inform the user whether a given year is a leap year:   $year = 2005; $date = new Date(date( quot;j quot;),date( quot;n quot;),$year); echo  quot;$year is  quot;. ($date- gt;isLeap() =...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Validating-and-Manipulating-Dates-with-PHP/</guid>
</item>
<item><title>Using the Date Constructor in PHP</title>
<pubDate>Wed, 18 Jan 2012 08:00:04 -0500</pubDate>
<link>http://www.codewalkers.com/c/a/Programming-Basics/Using-the-Date-Constructor-in-PHP/</link>
		<description><![CDATA[In this sixth part of an eight-part article series on working with time and dates in PHP, you'll study the date constructor in depth, and learn about accessors and mutators. This article is excerpted from chapter 12 of the book Beginning PHP and PostgreSQL 8: From Novice to Professional, written by W. Jason Gilmore and Robert H. Treat (Apress; ISBN: 1590595475).]]></description>
		<content:encoded><![CDATA[The Date Constructor  Before you can use the Date features, you need to instantiate a date object via its class constructor. This constructor is introduced in this section.   date()   object date ([integer day [, integer month [, integer year [, integer weekstart]]]])   The date() method is the class constructor. You can set the date either at the time of instantiation by using the day , month , and year parameters, or later by using a variety of mutators (setters), which are introduced next. To create an empty date object, just call date() like so:   $date = new Date();   To create an object ...]]></content:encoded>
<category>Programming Basics</category>
<guid isPermaLink="true">http://www.codewalkers.com/c/a/Programming-Basics/Using-the-Date-Constructor-in-PHP/</guid>
</item>
</channel>
</rss>

