Monthly Archives: January 2011

More backtracking examples

Backtracking might be costly so one should try to avoid useless backtracking. Perl regx have  special form of parentheses: (?>…). These are called Perl’s “don’t-ever-backtrack-into-me” markers. They will tell the regex engine that the enclosed sub-pattern can safely be skipped over during backtracking. As we know that the re-matching the contents either won’t succeed or, if it… Read More »

Backtracking example1

Let’s say you want to find the word following “foo” in the string “Food is on the foo table.”: #!/usr/bin/perl # Example of backtracking algorithm use 5.006; use strict; use warnings; $_ = “Food is on the foo table.”; if ( /b(foo)s+(w+)/i ) { print “$2 follows $1.n”; } When the match runs, the first… Read More »

Backtracking with Perl Regular expression

Wikipedia says Backtracking is a general algorithm for finding all (or some) solutions to some computational problem, that incrementally builds candidates to the solutions, and abandons each partial candidate c (“backtracks”) as soon as it determines that  cannot possibly be completed to a valid solution. What it meant for Perl: In fact Backtracking mechanism is core functionality of… Read More »

Perl coding tips from expert

[brightcove vid=724203979001&exp3=651017566001&surl=http://c.brightcove.com/services&pubid=115485138001&pk=AQ~~,AAAAGuNzXFE~,qu1BWJRU7c26MMkbB19ukwmFB5ysvYz5&w=300&h=225] Bigthink have many expert talks on Perl by Larry Wall. Enjoy!

Perl 6 book project on github

A Perl 6 book is in development on github. One can try and fork source code. You can catch the authors on #perl6book on irc.freenode.net. For more info like steps to build the book, pl see the README on github. PDF versions of this book can be found at http://puffin.ch/perl/6/ and http://github.com/perl6/book/downloads Enjoy learning  

New Year 2011 Wishes

Dear All, Throughout the Coming Year may your life be filled with little celebration of Happiness…Wishes you a Bright, Happy and Prosperous New Year 2011 Blogged with the Flock Browser