December 2014
Beginner
888 pages
25h 23m
English

By the end of this chapter, you should understand the following Perl code:
while(<DATA>){ ($name,$price)=split(":"); $price =~ s/$price/$& + ($& * .20)/e; printf "%s \$%.2f\n",$name, $price if $price > 35;}_ _DATA_ _Ramya:30.25Lu:12.66Shiva:65.75Dee:44.32
This is a regular expression: /love/. This is also a regular expression: /^.+$/.
A regular expression (regex) is really just a sequence, or pattern, of characters that is matched against a string of text when performing searches and replacements. Regexes have been around for ...