<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>HEIDI's Programming Lab(s)</title><link>http://heshanmw.blogspot.com/</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Bugz-burnerTech-pump" /><description>----- Experiments - Observations - Conclusions -----</description><language>en</language><managingEditor>noreply@blogger.com (Heshan)</managingEditor><lastBuildDate>Thu, 16 Feb 2012 02:04:36 PST</lastBuildDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">54</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/">25</openSearch:itemsPerPage><feedburner:info uri="bugz-burnertech-pump" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:copyright>©2008 Copyrights Heshan Wanigasooriya</media:copyright><media:thumbnail url="http://heshanonline.orgfree.com/Heshanmw.jpg" /><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Software How-To</media:category><itunes:owner><itunes:email>noreply@blogger.com</itunes:email><itunes:name>Heshan Wanigasooriya</itunes:name></itunes:owner><itunes:author>Heshan Wanigasooriya</itunes:author><itunes:explicit>no</itunes:explicit><itunes:image href="http://heshanonline.orgfree.com/Heshanmw.jpg" /><itunes:subtitle>www.heshanonline.tk</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Software How-To" /></itunes:category><item><title>Installing Trac on the Bluehost or Hostmonster</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/obUAwXVTiBs/installing-trac-on-bluehost-or.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Mon, 24 Nov 2008 16:29:32 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-4273126885598349577</guid><description>This guide was made primarily to help Hostmonster customers setup Trac. However, the setup is generic enough, that with only little modification, this guide can be applied to any shared-hosting setup running the Apache webserver (or if you want to use cgi for some reason). To work, you will need access to shell, and have basic understanding of text editing in shell. Hostmonster provides python2.3, and easy subversion repository setup - so these are assumed to already be in place.&lt;br /&gt;&lt;br /&gt;Also, because I do not like the login hack described on the Hostmonster Trac Wiki, I have assumed that you will install one of the login plugins. However, if you have access to the Apache setup file and do not wish to use a login manager, you can use the account setup method outlined in the Trac wiki.&lt;br /&gt;&lt;br /&gt;Full Story &lt;a href="http://heidisoft.com/blog/installing-trac-hostmonster-or-bluehost"&gt;HEIDI Software&lt;/a&gt;;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-4273126885598349577?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=obUAwXVTiBs:MxpZK8rm25o:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=obUAwXVTiBs:MxpZK8rm25o:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=obUAwXVTiBs:MxpZK8rm25o:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/obUAwXVTiBs" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-25T05:59:32.750+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/11/installing-trac-on-bluehost-or.html</feedburner:origLink></item><item><title>Moving to New Host</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/al8I7hEyJMo/moving-to-new-host.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Wed, 19 Nov 2008 14:02:04 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-6420310599581708359</guid><description>&lt;h2&gt; This Blog has been moved to &lt;a href="http://heidisoft.com/blog"&gt;HEIDI Software Labs&lt;/a&gt; &lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-6420310599581708359?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=al8I7hEyJMo:gHpnEnD0p4g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=al8I7hEyJMo:gHpnEnD0p4g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=al8I7hEyJMo:gHpnEnD0p4g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/al8I7hEyJMo" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-20T03:32:04.226+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/11/moving-to-new-host.html</feedburner:origLink></item><item><title>failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/dOju3z8__bA/failed-to-open-stream-http-request.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Thu, 13 Nov 2008 21:56:25 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-4713404184038567339</guid><description>Error: &lt;br /&gt;copy(http://4.bp.blogspot.com/_YJxWEghlXts/SL6FjtRxdyI/AAAAAAAAAk8/TBCnJNEWgWs/s320/Photo 25.jpg) [function.copy]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request&lt;br /&gt;&lt;br /&gt;Fixes :&lt;br /&gt; This error can be occurred due to the bad URL format. In the above URL you can see "Photo 25.jpg", which has spaces between name, so that you have to fill them by urlencode() or just using str_replace().&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-4713404184038567339?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=dOju3z8__bA:6YLeggi7liE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=dOju3z8__bA:6YLeggi7liE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=dOju3z8__bA:6YLeggi7liE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/dOju3z8__bA" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-14T11:26:25.935+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/11/failed-to-open-stream-http-request.html</feedburner:origLink></item><item><title>Trac on DreamHost in 5 minutes</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/Wj6SOcBK2Q8/trac-on-dreamhost-in-5-minutes.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Fri, 07 Nov 2008 09:40:39 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-8529141148284122267</guid><description>Trac on DreamHost in 5 minutes&lt;div id="entry-intro"&gt;&lt;p&gt;Installing &lt;a href="http://trac.edgewall.org/" title="A minimalistic web-based software project management and bug/issue tracking system"&gt;Trac&lt;/a&gt; on &lt;a href="http://www.dreamhost.com/r.cgi?122188" title="I use them, I like them"&gt;DreamHost shared hosting&lt;/a&gt; is no easy task. Sure, there are &lt;a href="http://wiki.dreamhost.com/Trac"&gt;some attempts&lt;/a&gt; to &lt;a href="http://wiki.dreamhost.com/DreamTracInstall"&gt;ease the pain&lt;/a&gt;, but they are half-done at best. So what I needed was a simple, automated, feature complete and easy to use way of &lt;strong&gt;installing Trac and managing my Trac projects on DreamHost&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;After some search it turned out there's nothing out there that satisfies my needs. That's why I've took matters in my own hands and created the &lt;a href="http://code.google.com/p/dreamy-trac" title="Automatically installs and manages Trac on DreamHost shared hosting"&gt;dreamy-trac&lt;/a&gt; open-source project.&lt;/p&gt;&lt;p&gt;Now, before installing we have to talk about...&lt;/p&gt;&lt;/div&gt;&lt;div id="entry-body"&gt;&lt;h3&gt;Preconditions&lt;/h3&gt;&lt;p&gt;To make all of that automatic goodness possible dreamy-trac makes some assumptions:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;you are doing this on a &lt;strong&gt;working DreamHost account&lt;/strong&gt; (best to create a new one),&lt;/li&gt; &lt;li&gt;you have &lt;strong&gt;shell access&lt;/strong&gt; to that account,&lt;/li&gt; &lt;li&gt;all Subversion repositories you wish to expose to Trac are &lt;strong&gt;owned by that account&lt;/strong&gt;,&lt;/li&gt; &lt;li&gt;all domains you wish to install Trac on are &lt;strong&gt;owned by that account&lt;/strong&gt;,&lt;/li&gt; &lt;li&gt;all domains you wish to install Trac on have &lt;strong&gt;FastCGI enabled&lt;/strong&gt; and&lt;/li&gt; &lt;li&gt;you understand what I've been talking about so far.&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;Installing Trac on DreamHost&lt;/h3&gt;&lt;p&gt;Please note that the following instructions are for the latest stable version of dreamy-trac (0.11.1) at the moment of this writing - so &lt;abbr title="Your Mileage May Vary"&gt;YMMV&lt;/abbr&gt;.&lt;/p&gt;&lt;p&gt;Logon to the desired shell account and enter the following commands:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;wget http://dreamy-trac.googlecode.com/files/dreamy-trac-0.11.1.tgz &lt;br /&gt;tar xzvf dreamy-trac-0.11.1.tgz&lt;br /&gt;cd dreamy-trac&lt;br /&gt;./configure.sh&lt;br /&gt;source ~/.bash_profile&lt;br /&gt;./install.sh&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;If Trac installed successfully you should be rewarded with the following message:&lt;pre&gt;&lt;code&gt;...lines omitted...&lt;br /&gt;You have installed Trac. To create a new trac project run 'create_trac_project.'&lt;br /&gt;Thank you for using dreamy-trac :)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Creating a new Trac project&lt;/h3&gt;&lt;p&gt;You wouldn't believe how simple it is - just run &lt;code&gt;create_trac_project&lt;/code&gt;, follow the instructions and the script will:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;create a new Trac project,&lt;/li&gt; &lt;li&gt;setup permissions and create a superuser,&lt;/li&gt; &lt;li&gt;setup and use Account Manager plugin&lt;/li&gt; &lt;li&gt;setup the Subversion post-commit hook,&lt;/li&gt; &lt;li&gt;make your Trac project web accessible via FastCGI,&lt;/li&gt; &lt;li&gt;make your Trac project URLs pretty and&lt;/li&gt; &lt;li&gt;make Apache serve the static files instead of Trac.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-8529141148284122267?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=Wj6SOcBK2Q8:w63yC3RKFg4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=Wj6SOcBK2Q8:w63yC3RKFg4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=Wj6SOcBK2Q8:w63yC3RKFg4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/Wj6SOcBK2Q8" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-07T23:10:39.115+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/11/trac-on-dreamhost-in-5-minutes.html</feedburner:origLink></item><item><title>DrupalCon in DC</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/tu3dmma9oFU/drupalcon-in-dc.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Mon, 03 Nov 2008 23:13:46 PST</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-7580177400875497350</guid><description>&lt;a href="http://dc2009.drupalcon.org/?ref=default"&gt;&lt;img src="http://dc2009.drupalcon.org/sites/all/themes/dcdc/badges/badge_basic.gif" alt="" title=""  style="border:0px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dc2009.drupalcon.org/?ref=default"&gt;&lt;img src="http://dc2009.drupalcon.org/sites/all/themes/dcdc/badges/badge_imgoing.gif" alt="" title=""  style="border:0px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;DrupalCon is the official Drupal unconference that attracts the most talented open source developers and innovative web shops in the world and brings them together to share knowledge, make decisions on the future of Drupal, and get to know each other in person.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;It's also the premiere opportunity for Drupal users to learn what they can do with Drupal, find partners for future projects, and meet the people behind the code.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In this agenda you can see what the conference will focus on, and as you can see it's designed for both developers and Drupal users. The first three days of the conference will be about learning, while the last day will be about doing - that's when we'll all work together to push code and documentation forward.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;DrupalCon is a volunteer run, nonprofit conference. Thanks to everyone who's helped and to our fantastic sponsors, who are letting us keep ticket prices low by paying for more than half of this event!&lt;/p&gt;&lt;br /&gt;&lt;h3&gt;Quick look at the agenda&lt;/h3&gt;&lt;br /&gt;&lt;table&gt;&lt;br /&gt;&lt;thead&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;th&gt;&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Wednesday&lt;/th&gt;&lt;br /&gt;&lt;br /&gt;&lt;th&gt;Thursday&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Friday&lt;/th&gt;&lt;br /&gt;&lt;th&gt;Saturday&lt;/th&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/thead&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;1&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Design and Usability&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Code Development&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Code Development&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Code Sprint&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;2&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Showcase and Strategy&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Showcase and Strategy&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Business Side&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Documentation Sprint&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;3&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;Performance and Scalability&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Code Development&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Showcase and Strategy&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;4&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Code Development&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Drupal Community&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Code Development&lt;/td&gt;&lt;br /&gt;&lt;br /&gt;&lt;td&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-7580177400875497350?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=tu3dmma9oFU:T4DKolHvD0E:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=tu3dmma9oFU:T4DKolHvD0E:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=tu3dmma9oFU:T4DKolHvD0E:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/tu3dmma9oFU" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-11-04T12:43:46.678+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/11/drupalcon-in-dc.html</feedburner:origLink></item><item><title>Fix HFS + Partition Error on dual boot Mac OS and Vista</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/L_I9cy9wYr4/fix-hfs-partition-error-on-dual-boot.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Thu, 09 Oct 2008 20:27:09 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-3919108875240370999</guid><description>This guide is for restoring our nice, working hackintosh's darwin bootloader.&lt;br /&gt;&lt;br /&gt;Basically, Vista RTM foobars our working MBR's bootloader and you get "HFS+ partition error".&lt;br /&gt;In following, I will assume we have one HDD with two partitions: part#1 = OSX and part#2 = Vista&lt;br /&gt;&lt;br /&gt;1. Boot off OSX dvd disc in single user mode (press F8 and type -s)&lt;br /&gt;2. At single user prompt&lt;br /&gt;fdisk -e /dev/rdisk0&lt;br /&gt;flag 1&lt;br /&gt;update&lt;br /&gt;write&lt;br /&gt;quit&lt;br /&gt;4 reboot&lt;br /&gt;&lt;br /&gt;At this point OSX should boot up, just like prior to Vista installation.&lt;br /&gt;1 In a terminal window,&lt;br /&gt;su root&lt;br /&gt;fdisk -e /dev/rdisk0&lt;br /&gt;flag 2&lt;br /&gt;quit&lt;br /&gt;2 reboot&lt;br /&gt;&lt;br /&gt;Vista will say "\Window\system32\winload" corrupted, and it will tell you to insert Vista disc and recover.&lt;br /&gt;Follow directions from Vista and recover, then reboot. Check Vista boots and works fine.&lt;br /&gt;&lt;br /&gt;1. Boot off OSX dvd disc for single user one last time (press F8 and type -s)&lt;br /&gt;2. At single user prompt&lt;br /&gt;fdisk -e /dev/rdisk0&lt;br /&gt;flag 1&lt;br /&gt;quit&lt;br /&gt;3. reboot&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-3919108875240370999?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=L_I9cy9wYr4:lGYVNxeR3C0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=L_I9cy9wYr4:lGYVNxeR3C0:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=L_I9cy9wYr4:lGYVNxeR3C0:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/L_I9cy9wYr4" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-10T08:57:09.982+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/10/fix-hfs-partition-error-on-dual-boot.html</feedburner:origLink></item><item><title>Dual Boot { Kalyway | iAtkos | Leo4all | Jas | iDeneb } 10.5.2 to 10.5.5 MAC OSX86 Leopard + Vista Installation gu</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/_U0OyixnC1g/google-search-google-custom-search-dual.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Mon, 06 Oct 2008 07:31:05 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-2197898156023868549</guid><description>This guide will show you how to make a Dual Boot &lt;strong&gt;10.5.X OSX86&lt;/strong&gt; System with &lt;strong&gt;WINDOWS VISTA&lt;/strong&gt; . Use this guide with your favourite distro { &lt;strong&gt;Kalyway iAtkos Leo4all Jas iDeneb&lt;/strong&gt; }&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=""&gt;Personally I found Kalyway and iAtkos more effective than other distro's.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;span style=""&gt;&lt;strong&gt;1 .&lt;/strong&gt; First of all you have to install Vista. It's easy and I m sure that you are familiar with it.&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;strong&gt;2 .&lt;/strong&gt; Partitioning have an vital role so take care of it for installing OSX you need to have a partition of minimum 10 gb. The partition must be formatted as &lt;strong&gt;&lt;em&gt;FAT-32 Primary Partition.&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=""&gt;You can use Partition Magic for partitiong also.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=""&gt;&lt;strong&gt;3 .&lt;/strong&gt; Boot into Windows installation and open &lt;strong&gt;&lt;em&gt;Command Prompt&lt;/em&gt;&lt;/strong&gt; { Start &amp;lt; All Program &amp;lt; Accessories &amp;lt; Command prompt } With Administrative Privillage and run following commands.&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style=""&gt;&lt;strong&gt;4 .&lt;/strong&gt; In command prompt type&lt;strong&gt;&lt;em&gt;DISKPART &lt;/em&gt;&lt;/strong&gt;and press enter. Now you are in DISKPART utility . So here we are using DISKPART for making HFS compatible Partition.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-left: 35pt;"&gt;&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 223px;"&gt;&lt;col style="width: 367px;"&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="border-style: solid; border-color: rgb(247, 150, 70); border-width: 1pt 1pt 2.25pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style=""&gt;&lt;strong&gt;&lt;em&gt;Command&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: solid solid solid none; border-color: rgb(247, 150, 70) rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: 1pt 1pt 2.25pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style=""&gt;&lt;strong&gt;&lt;em&gt;Preface&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; list disk &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;" This will show you a list of selectable disks. "&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; select disk n&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;[where n = the disk number]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;This will specify which disk to create a new partition on&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; create partition primary size=n id=af&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;[where n = the size in MB of the partition, For 20 gb space n will be 20000 ]&lt;br /&gt;[where af = hfs+ compatible]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;Will proceed to create a bootable primary partition for the Mac&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; list partition&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;" This command will show you the partitions on your selected disk "&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; select partition n&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;[where n = the newly created OSX partition]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;This will specify the partition&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; active&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;" This will make your OS X partition the first-boot active partition "&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; height: 26px;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; Exit&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;Exit from DiskPart...........&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="margin-left: 36pt;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style=""&gt;&lt;strong&gt;5 .&lt;/strong&gt;In Windows Vista you must disable &lt;strong&gt;&lt;em&gt;User Account Control &lt;/em&gt;&lt;/strong&gt;[ &lt;strong&gt;&lt;em&gt;UAC &lt;/em&gt;&lt;/strong&gt;].&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;6 .&lt;/strong&gt; Put your DVD in rom and restart your computer with the DVD in Drive,now you should see Darwin load screen.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;7 .&lt;/strong&gt; As counting starts press F8 key and you will be able to have some more option's.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;8 .&lt;/strong&gt; Now type –V and press enter now enterd in VERBOSE mode here you are able to see any error if your screen freezes for more than 15 minutes than note last three lines and google them to find out a solution for your problem. If every thing goes fine after 15-30 minutes installation screen appear's hold your breath we are not quit yet here.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;9 .&lt;/strong&gt; On the top a menu bar appears click Utilities .&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;10 .&lt;/strong&gt; Here select the destination drive where u want to install Mac OSX.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;11 .&lt;/strong&gt; Now click on ERASE on right hand side and under the format option select&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;" MAC OSX Journaled Extended " and click Erase. Now the disk will be erased and mounted once this done you are very near to near to your destination.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;strong&gt;12 .&lt;/strong&gt; Now close the disk utility and click on the partition which you created at previous&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;br /&gt;Step.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;13 .&lt;/strong&gt; Now your disk will be checked for consistency than installaion begins. It will take 30-45 minute's as your hardware.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;14 .&lt;/strong&gt; Once the installation finishes . click on restart with the DVD inside in drive.Don't remove the disk.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;span style=""&gt;&lt;strong&gt;15 ..&lt;/strong&gt; computer restart's don't click anything even you see the boot screen. Yes you done it enjoy&lt;/span&gt;&lt;span style=""&gt;……….&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;br /&gt;___________________________________________________________&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;&lt;em&gt;Now you have two option's Boot with Darwin Bootloader or use VISTA bootloader&lt;/em&gt;&lt;/strong&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;______________________________________________________ &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;&lt;em&gt;For Darwin bootloader follow these instruction.&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;Darwin has its own dual-boot menu which is easy to activate, just press F8 on your keyboard before the Darwin boot loader prompt and Apple boot logo.The dual-boot menu might appear by itself depending on whether or not the install disc automatically sets the time-out period for you.&lt;br /&gt;If you want to create a time-out that will allow you to select which OS to boot from without pressing F8, follow these instructions:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;&lt;br /&gt;Firstly, load up Terminal (Applications/Utilities/) from within OS X, then type:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;sudo nano /Library/Preferences/SystemConfiguration/com.apple.Boot.plist&lt;br /&gt;&lt;br /&gt;edit the Darwin time-out &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;flag accordingly:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(102, 0, 0);"&gt;&amp;lt;key&amp;gt;Timeout&amp;lt;/key&amp;gt;&lt;br /&gt;&amp;lt;string&amp;gt;8&amp;lt;/string&amp;gt;&lt;/span&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:Verdana;"&gt;&lt;span style="color: rgb(34, 34, 34);"&gt;Press CTRL+O and then Enter to save the file, after which you can safely close the session by pressing CTRL+X.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=""&gt;&lt;span style="color: rgb(34, 34, 34);font-family:Verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;- x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;&lt;em&gt;For VISTA bootloader use this guide .&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(34, 34, 34);font-family:Verdana;" &gt;Put the Vista Installation Disc into your DVD drive and restart to boot from it. Click Repair System, press next and then select Command Prompt Type DISKPART and press Enter.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;table style="border-collapse: collapse;" border="0"&gt;&lt;colgroup&gt;&lt;col style="width: 253px;"&gt;&lt;col style="width: 385px;"&gt;&lt;/colgroup&gt;&lt;tbody valign="top"&gt;&lt;tr&gt;&lt;td style="border-style: solid; border-color: rgb(247, 150, 70); border-width: 1pt 1pt 2.25pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(34, 34, 34);font-family:Verdana;" &gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: solid solid solid none; border-color: rgb(247, 150, 70) rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: 1pt 1pt 2.25pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(34, 34, 34);font-family:Verdana;" &gt;&lt;strong&gt;Preface&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; list disk&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;" This will show you a list of selectable disks. "&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; select disk n&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;[where n = the disk number]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;Select the disk which Windows Vista is installed to&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; list partition&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;This will show you the partitions on your selected disk&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; select partition n&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;[where n = the Windows Vista partition]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;This will specify the partition&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; active&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;Will make your Windows Vista partition the first-boot active partition&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr style="background: rgb(253, 228, 208) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;&lt;strong&gt;DISKPART&amp;gt; Exit&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;p&gt;&lt;span style="color: rgb(102, 0, 0);font-family:Verdana;" &gt;Exit from DiskPart...........&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="border-style: none solid solid; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70); border-width: medium 1pt 1pt; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="border-style: none solid solid none; border-color: -moz-use-text-color rgb(247, 150, 70) rgb(247, 150, 70) -moz-use-text-color; border-width: medium 1pt 1pt medium; padding-right: 7px; padding-left: 7px;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(34, 34, 34);font-family:Verdana;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(34, 34, 34);font-family:Verdana;" &gt;Reboot into Windows Vista.&lt;br /&gt;Next, you can either follow the command line BCDEDIT instructions below, or use EasyBCD.&lt;br /&gt;&lt;br /&gt;Copy CHAIN0 from your Mac OS X partition or Installation Disc to the root of your Vista partition C:\.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;- x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;&lt;em&gt;For Vista Bootloader you can also use BCD-EDIT.&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;strong&gt;&lt;em&gt;1)&lt;/em&gt;&lt;/strong&gt; Boot into Vista. Copy the chain0 file from the Leopard DVD to C:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style=""&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;2)&lt;/em&gt;&lt;/strong&gt; Open the "Command prompt" with "Elevated Admin" privileges from the Start Menu.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;3)&lt;/em&gt;&lt;/strong&gt; Type the following into the prompt&lt;br /&gt;&lt;br /&gt;bcdedit /copy {current} /d "Mac OS X"&lt;br /&gt;&lt;/p&gt;&lt;p&gt;bcdedit /enum active&lt;br /&gt;bcdedit /set {GUID} PATH \chain0&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;4)&lt;/em&gt;&lt;/strong&gt; In the first command type {current} as it is, literally..nothing else..just {current} with the brackets. In the 3rd command however, replace the {GUID} with the alphanumeric GUID you see in the enumerated list under MAC OS X. You can see this list on your terminal as soon as you type the 2nd command above.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;5)&lt;/em&gt;&lt;/strong&gt; Close the Command Prompt and Restart Vista.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;6)&lt;/em&gt;&lt;/strong&gt; You Should now be looking at a screen with two options to boot into Mac OSX or Vista.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Select Mac OSX to see if you can boot into it. You should see the familiar Darwin boot Loading screen with the timer going down. If you dont do anything, then it counts to zero and again shows the menu screen with Vista and MAC OSX options. Dont panic!&lt;br /&gt;&lt;br /&gt;Again select MAC OS X, and now as the timer counts down, Press F8. You would see a list of partitions on your disk with their names. Select the partition with MAC OSX installed by using up/down arrows and press ENTER.&lt;/p&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;- x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x – x –&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: rgb(51, 51, 51);font-family:Arial;" &gt;If you find this guide useful to you than digg it for raisimg my moral………………..&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-2197898156023868549?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=_U0OyixnC1g:d7SmEWDTQsQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=_U0OyixnC1g:d7SmEWDTQsQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=_U0OyixnC1g:d7SmEWDTQsQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/_U0OyixnC1g" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-06T20:01:05.489+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/10/google-search-google-custom-search-dual.html</feedburner:origLink></item><item><title>Speed Test on Dialog HSDPA</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/sH5kUhSzGkY/speed-test-on-dialgo-hspa.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Mon, 29 Sep 2008 05:18:50 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-1806802602817034098</guid><description>&lt;a href="http://www.speedtest.net"&gt;&lt;img src="http://www.speedtest.net/result/330466070.png"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-1806802602817034098?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=sH5kUhSzGkY:tdC_7Z-iWcg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=sH5kUhSzGkY:tdC_7Z-iWcg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=sH5kUhSzGkY:tdC_7Z-iWcg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/sH5kUhSzGkY" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-29T17:48:50.744+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/09/speed-test-on-dialgo-hspa.html</feedburner:origLink></item><item><title>Apple iPhone</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/u3dyuRQEmyE/apple-iphone.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sun, 28 Sep 2008 02:32:58 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-2304516526798091480</guid><description>http://www.youtube.com/watch?v=YgW7or1TuFk&lt;br /&gt;&lt;br /&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/YgW7or1TuFk&amp;hl=en&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/YgW7or1TuFk&amp;hl=en&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-2304516526798091480?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=u3dyuRQEmyE:6730BwcBwqc:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=u3dyuRQEmyE:6730BwcBwqc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=u3dyuRQEmyE:6730BwcBwqc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/u3dyuRQEmyE" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-28T15:02:58.601+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><media:content url="http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~5/zuQZblrpasA/YgW7or1TuFk&amp;hl=en&amp;fs=1" fileSize="1038" type="application/x-shockwave-flash" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>http://www.youtube.com/watch?v=YgW7or1TuFk Heshan Wanigasooriya</itunes:subtitle><itunes:author>Heshan Wanigasooriya</itunes:author><itunes:summary>http://www.youtube.com/watch?v=YgW7or1TuFk Heshan Wanigasooriya</itunes:summary><feedburner:origLink>http://heshanmw.blogspot.com/2008/09/apple-iphone.html</feedburner:origLink><enclosure url="http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~5/zuQZblrpasA/YgW7or1TuFk&amp;hl=en&amp;fs=1" length="1038" type="application/x-shockwave-flash" /><feedburner:origEnclosureLink>http://www.youtube.com/v/YgW7or1TuFk&amp;hl=en&amp;fs=1</feedburner:origEnclosureLink></item><item><title>Launched a new Firefox extetntion - FireImage</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/ofnpFM7YQU0/launched-new-firefox-extetntion.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sat, 27 Sep 2008 06:08:40 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-1652398353961458862</guid><description>&lt;span style="font-weight:bold;"&gt;I fortunate to contribute for Firefox extension development,as a one of my project on rent a coder.&lt;br /&gt;It was very interesting idea for me to continue working night and day. The buyer also gave me a nice help on all the way that he can.&lt;br /&gt; &lt;br /&gt;&lt;blockquote&gt;OFFICIAL WEBSITE  : &lt;a href="http://www.keepaa.com/"&gt;www.keeimages.com&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;DOWNLOAD THE Add-On : &lt;a href="http://www.keepaa.com/files/FireImage-v1.0.xpi"&gt;FireImage v1.0&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Their requirement was :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A Firefox plug in/add on where users right click on an image they see on the web and save it to an image website. Can be done when registered also. You need to build the website as well as the plug in/add on.&lt;br /&gt;&lt;br /&gt;Step By Step functionality&lt;br /&gt;&lt;br /&gt;A user installs the Firefox plugin.&lt;br /&gt;&lt;br /&gt;They are at a website where they see an image they like.&lt;br /&gt;&lt;br /&gt;They right click on the image and select 'save image to website'&lt;br /&gt;&lt;br /&gt;A pop-up box comes up with 'name your file' and they name it and hit ok&lt;br /&gt;&lt;br /&gt;a pop-up box comes up with 'add tags' they enter tags and hit ok&lt;br /&gt;&lt;br /&gt;The image is than uploaded to the server in the background with a scrambled file name like dsfs7d6fshdsfs5.jpg and the file name the user entered and tags are associated with the file in the database.&lt;br /&gt;&lt;br /&gt;the file is saved to a page eg. website.com/images/scrabmedtext/ which is my website template with the image, filename and tags in the content area.&lt;br /&gt;&lt;br /&gt;(in the user's perspective, the last thing they did was add their tags and hit ok.&lt;br /&gt;&lt;br /&gt;a box appears in front of the user with the url to this page mentioned above where they can copy it.&lt;br /&gt;&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;If the user is registered to the website they enter their details into the plugins preferences. username and password.&lt;br /&gt;&lt;br /&gt;If the details are correct, the user can d the samer as above, however they get a page www.website.com/username/ where the user's images are, in a stream from newest to oldest, in a blog type format. 5 images per page. Users have the option to log into the site and delete the image, change the title or add/remove tags.&lt;br /&gt;&lt;br /&gt;The site needs a basic template, with a header, left right and bottom as php includes. I can change everything.&lt;br /&gt;&lt;br /&gt;Site needs to be powered by php and well commented&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I need an admin panel, where I can delete certain images or accounts. I also need to be able to see total amount of registred accounts. I need to be able to set a max mb limit for images.&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;&lt;br /&gt;Server info:&lt;br /&gt;&lt;br /&gt;images are saved as a scrambled filename in their original format.&lt;br /&gt;saved to a certain folder eg. website.com/img/ - there can be scrambled dirs after that if need be as you cannot have millions of files in one directory - but the original file is the identifier.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---------------&lt;br /&gt;&lt;br /&gt;I could come-up with a nice solution that impressed by the buyer.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;OFFICIAL WEBSITE  : &lt;a href="http://www.keepaa.com/"&gt;www.keepaa.com&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;DOWNLOAD THE Add-On : &lt;a href="http://www.keepaa.com/files/FireImage-v1.0.xpi"&gt;FireImage v1.0&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Please let me know if any bug or security issue found .&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-1652398353961458862?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=ofnpFM7YQU0:k9-TrZjsnWE:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=ofnpFM7YQU0:k9-TrZjsnWE:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=ofnpFM7YQU0:k9-TrZjsnWE:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/ofnpFM7YQU0" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-27T18:38:40.635+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/09/launched-new-firefox-extetntion.html</feedburner:origLink></item><item><title>PHP recursive directory remove function</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/n4MJd-etUMo/php-recursive-directory-remove-function.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Thu, 04 Sep 2008 06:11:39 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-4898883491742236645</guid><description>&lt;?php&lt;br /&gt;function RemoveDir($sDir) {&lt;br /&gt;if (is_dir($sDir)) {&lt;br /&gt;$sDir = rtrim($sDir, '/');&lt;br /&gt;$oDir = dir($sDir);&lt;br /&gt;while (($sFile = $oDir-&gt;read()) !== false) {&lt;br /&gt;if ($sFile != '.' &amp;&amp; $sFile != '..') {&lt;br /&gt;(!is_link("$sDir/$sFile") &amp;&amp; is_dir("$sDir/$sFile")) ? RemoveDir("$sDir/$sFile") : unlink("$sDir/$sFile");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;$oDir-&gt;close();&lt;br /&gt;rmdir($sDir);&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;return false;&lt;br /&gt; }&lt;br /&gt;?&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-4898883491742236645?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=n4MJd-etUMo:d8ubHutwr2Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=n4MJd-etUMo:d8ubHutwr2Y:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=n4MJd-etUMo:d8ubHutwr2Y:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/n4MJd-etUMo" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-04T18:41:39.910+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/09/php-recursive-directory-remove-function.html</feedburner:origLink></item><item><title>Validate Email address in JS and RE</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/rcflfe1-6LQ/validate-email-address-in-js-and-re.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Tue, 12 Aug 2008 00:18:53 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-928720613934331253</guid><description>&lt;code&gt;&amp;lt;script language="javascript"&amp;gt;&lt;br&gt;function checkEmail() {&lt;br&gt;var email = document.getElementById(’emailaddress’);&lt;br&gt;var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;&lt;br&gt;if (!filter.test(email.value)) {&lt;br&gt;alert(’Please provide a valid email address’);&lt;br&gt;email.focus&lt;br&gt;return false;&lt;br&gt;}&lt;br&gt;}&lt;br&gt;&amp;lt;/script&amp;gt;code&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-928720613934331253?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=rcflfe1-6LQ:-8hjOq3T170:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=rcflfe1-6LQ:-8hjOq3T170:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=rcflfe1-6LQ:-8hjOq3T170:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/rcflfe1-6LQ" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-12T12:48:53.006+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/08/validate-email-address-in-js-and-re.html</feedburner:origLink></item><item><title>How to create and remove directory / folder in PHP</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/2ULRtF3Hhdg/how-to-create-and-remove-directory.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Mon, 11 Aug 2008 23:23:01 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-4420577059671543789</guid><description>&lt;span style="font-weight: bold;"&gt;Remove directory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;$mydir = '/path/directory/images/'; // this will remove images directory&lt;br /&gt;if (is_dir($mydir)) {&lt;br /&gt;rmdir($mydir);&lt;br /&gt;} else {&lt;br /&gt;echo $mydir.' does not exists';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Create&lt;/span&gt;&lt;br /&gt;$mydir = '/path/directory/images/&lt;br /&gt;mkdir($mydir);&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-4420577059671543789?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=2ULRtF3Hhdg:A4IMdsyAB_U:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=2ULRtF3Hhdg:A4IMdsyAB_U:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=2ULRtF3Hhdg:A4IMdsyAB_U:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/2ULRtF3Hhdg" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-12T11:53:01.963+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/08/how-to-create-and-remove-directory.html</feedburner:origLink></item><item><title>New theme Design for Drupal 5.xx</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/mD1sFh15sfk/new-theme-design-for-drupal-5xx.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Wed, 23 Jul 2008 22:32:36 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-261773302522051049</guid><description>A new theme has launched by me for the Drupal CMS.&lt;br /&gt;screen shots are available here and contact me if you want to  download it.&lt;br /&gt;This will publish very soon in the Drual site.&lt;br /&gt;Hesh&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;div style="text-align: left;"&gt;&lt;div style="overflow: hidden; position: relative; min-width: 512px; height: 512px;"&gt;&lt;img src="http://lh4.ggpht.com/heshanmw/SIgS2atKa6I/AAAAAAAAAFg/JvvyRc9Pt20/when%20content%20display.jpg?imgmax=512" style="position: absolute; width: 367px; height: 512px; left: 2px; top: 0px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="overflow: hidden; position: relative; min-width: 512px; height: 369px;"&gt;&lt;img src="http://lh6.ggpht.com/heshanmw/SIgS2LWhLJI/AAAAAAAAAFY/U27XiHXRUPg/login%20access.jpg?imgmax=800" style="position: absolute; width: 893px; height: 369px; left: -1px; top: 0px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="overflow: hidden; position: relative; min-width: 512px; height: 386px;"&gt;&lt;img src="http://lh5.ggpht.com/heshanmw/SIgS2CQ41cI/AAAAAAAAAFQ/W-z0jQxzNag/before%20login%20search%20hides.jpg?imgmax=640" style="position: absolute; width: 811px; height: 386px; left: 1px; top: 0px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="overflow: hidden; position: relative; min-width: 512px; height: 363px;"&gt;&lt;br /&gt;&lt;div&gt;&lt;div style="overflow: hidden; position: relative; min-width: 512px; height: 386px;"&gt;&lt;img src="http://lh5.ggpht.com/heshanmw/SIgS2CQ41cI/AAAAAAAAAFQ/W-z0jQxzNag/before%20login%20search%20hides.jpg?imgmax=640" style="position: absolute; width: 640px; height: 386px; left: 172px; top: 0px;" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://lh5.ggpht.com/heshanmw/SIgS2MRcsiI/AAAAAAAAAFI/8cTbIAmoOWs/loged_user_search%20appere.jpg?imgmax=640" style="position: absolute; width: 812px; height: 363px; left: 0px; top: 0px;" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-261773302522051049?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=mD1sFh15sfk:XbHy-atbDCA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=mD1sFh15sfk:XbHy-atbDCA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=mD1sFh15sfk:XbHy-atbDCA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/mD1sFh15sfk" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-24T11:02:36.957+05:30</app:edited><media:thumbnail url="http://lh4.ggpht.com/heshanmw/SIgS2atKa6I/AAAAAAAAAFg/JvvyRc9Pt20/s72-c/when%20content%20display.jpg?imgmax=512" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/07/new-theme-design-for-drupal-5xx.html</feedburner:origLink></item><item><title>Logo Launched for rent a coder</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/Ss47qOpxKVE/logo-launched-for-rent-coder.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sun, 20 Jul 2008 10:34:02 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-3585277177929743857</guid><description>&lt;img src="http://www.rentacoder.com/upload_PSC/AuthorPhotos/AUTHOR_PHOTO20087201143582729.png" alt="author picture" align="middle" border="0" /&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-3585277177929743857?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=Ss47qOpxKVE:nn1ocH-ZgDQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=Ss47qOpxKVE:nn1ocH-ZgDQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=Ss47qOpxKVE:nn1ocH-ZgDQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/Ss47qOpxKVE" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-20T23:04:02.769+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/07/logo-launched-for-rent-coder.html</feedburner:origLink></item><item><title>How to bypass proxy server</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/7OKIZ9cACp0/how-to-bypass-proxy-server.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sun, 20 Jul 2008 09:06:50 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-5512913078197309551</guid><description>Most network administrators at work, university or school deny access to certain websites, instant messaging or social networks such as facebook, myspace or orkut with a firewall or proxy server. If you are constantly getting a message saying “Can’t connect” or something similar, the service you are trying to connect to have probably been blocked by your network administrator.&lt;br /&gt;&lt;br /&gt;The same is the case with my college LAN where most of the things are blocked and even many institutional sites are not accessible. Damn it! But as soon as the system is made, next day it’s broken. That’s the way we suppose to live.&lt;br /&gt;&lt;br /&gt;So, it’s time to focus on our main topic- how to bypass firewalls, proxy servers and hide IP address.&lt;br /&gt;&lt;br /&gt;Software Requirements&lt;br /&gt;1- &lt;a href="http://www.hopster.com"&gt;HOPSTER -&gt; Download and Install. &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Visit &lt;a href="http://www.hopster.com"&gt;here&lt;/a&gt; for help.&lt;br /&gt;&lt;br /&gt;---- OR ----&lt;br /&gt;&lt;br /&gt;1- &lt;a href="http://anon.inf.tu-dresden.de/win/download_en.html"&gt;JAP -&gt; Download and Install. &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2- Java Runtime Enviroment(JRE) -&gt; Download and Install.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There is an open source utility called JAP that protects our privacy on the Internet. In process to this it also helps to bypass firewalls and proxy servers.&lt;br /&gt;&lt;br /&gt;Instead of connecting directly to a webserver, users take a detour, connecting with encryption through several intermediaries, so-called Mixes. JAP uses a predetermined sequence for the mixes. Such a sequence of linked mixes is called a Mix Cascade. Users can choose between different mix cascades.&lt;br /&gt;&lt;br /&gt;Since many users use these intermediaries at the same time, the internet connection of any one single user is hidden among the connections of all the other users. No one, not anyone from outside, not any of the other users, not even the provider of the intermediary service can determine which connection belongs to which user.&lt;br /&gt;&lt;br /&gt;Let’s learn how to configure it. Just follow the steps:-&lt;br /&gt;&lt;br /&gt;1- After installation, open JAP and click on “Config” button.&lt;br /&gt;Photobucket&lt;br /&gt;&lt;br /&gt;A “Settings” window will get opened.&lt;br /&gt;&lt;br /&gt;2- Click on “Network” and if you are using any proxy to connect to the Internet then enter your proxy details under “Proxy/Firewall” section. Don’t forget to choose type of the proxy you are having.&lt;br /&gt;Photobucket&lt;br /&gt;&lt;br /&gt;3- Next, choose “Services” under “Anonymity” option.&lt;br /&gt;&lt;br /&gt;4- Click on the “Reload” button and after few minutes you’ll get a list of services called “Mix Cascades and single Mixes”&lt;br /&gt;&lt;br /&gt;It is through these services we will get connected to the Internet, bypass the firewall and surf anonymously. It’s important to first understand these different types of services before start using it. There are basically 3 types of services that may be available to you at a given time. First one is the paid one, second is free services and third is the test service.&lt;br /&gt;&lt;br /&gt;We will be focusing on Free Services here. Now how to recognize which service is of what type?&lt;br /&gt;&lt;br /&gt;5- From the dropdown list above select “Mix cascades without costs“.&lt;br /&gt;&lt;br /&gt;6- Now the RED stop mark before a service name shows it is “excluded by filter” which means it’s a paid service. But a BLUE ball mark before a service name shows it’s free to use.&lt;br /&gt;&lt;br /&gt;7- Choose any one of the available free services and click on the “Select” button to activate it.&lt;br /&gt;Photobucket&lt;br /&gt;&lt;br /&gt;Free Services that I prefer are “Dresden-Dresden” or “SpeedParter-ULD”&lt;br /&gt;&lt;br /&gt;8- Click “OK”.&lt;br /&gt;&lt;br /&gt;That’s it. You are all set to connect to the Internet now.&lt;br /&gt;&lt;br /&gt;9- Set Anonymity to “On“.&lt;br /&gt;Photobucket&lt;br /&gt;&lt;br /&gt;Soon JAP will get connected. Now, let’s learn how to use it.&lt;br /&gt;&lt;br /&gt;To make web applications ( like Internet Explorer, YM, GTalk etc) work with JAP, use “IP address” 127.0.0.1 and “port number” 4001 under connection settings of your applications.&lt;br /&gt;&lt;br /&gt;(If this particular part is not clear, please ask your doubts in comments section of this post)&lt;br /&gt;&lt;br /&gt;ALL DONE!!!&lt;br /&gt;&lt;br /&gt;No more blocked web sites, no more blocked IMs. Everything is unblocked now that too with certain level of anonymity. Isn’t great?&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-5512913078197309551?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=7OKIZ9cACp0:_WqC_zmSvcs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=7OKIZ9cACp0:_WqC_zmSvcs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=7OKIZ9cACp0:_WqC_zmSvcs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/7OKIZ9cACp0" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-20T21:36:50.752+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/07/how-to-bypass-proxy-server.html</feedburner:origLink></item><item><title>Drupal Programming from an Object-Oriented Perspective</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/btgbpEiz3WA/drupal-programming-from-object-oriented.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sun, 13 Jul 2008 02:26:41 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-1805912835954487815</guid><description>&lt;h1&gt;Drupal Programming from an Object-Oriented Perspective&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Drupal often gets criticized by newcomers who believe that&lt;br /&gt;    object-oriented programming (OOP) is always the best way to design software&lt;br /&gt;    architecture, and since they do not see the word "class" in the Drupal&lt;br /&gt;    code, it must be inferior to other solutions. In fact, it is true that&lt;br /&gt;    Drupal does not use many of the OOP features of PHP, but it is a mistake to&lt;br /&gt;    think that the use of classes is synonymous with object-oriented design.&lt;br /&gt;    This article will cover several of the features of Drupal from an&lt;br /&gt;    object-oriented perspective, so programmers comfortable with that paradigm&lt;br /&gt;    can begin to feel at home in the Drupal code base, and hopefully be able to&lt;br /&gt;    choose the right tool for the job.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h2&gt;Motivations for Current Design&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;As of version 4.6, Drupal does not use PHP's &lt;a&lt;br /&gt;    href="http://www.php.net/manual/en/language.oop.php#keyword.class"&gt;class&lt;/a&gt;&lt;br /&gt;    construct. This decision was made for several reasons.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;First, PHP's support for object-oriented constructs was much less&lt;br /&gt;    mature at the time of Drupal's design. Drupal was built on PHP 4, and most&lt;br /&gt;    of the improvements in PHP 5 relate to its &lt;a&lt;br /&gt;    href="http://www.php.net/manual/en/migration5.oop.php"&gt;object-oriented&lt;br /&gt;    features&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Second, Drupal code is highly compartmentalized into modules, each of&lt;br /&gt;    which defines its own set of functions. The inclusion of files is handled&lt;br /&gt;    inside functions as well; PHP's performance suffers if all code is included&lt;br /&gt;    on each page call, so Drupal attempts to load as little code as possible&lt;br /&gt;    per request. This is a critical consideration, especially in the absence of&lt;br /&gt;    a &lt;a href="http://www.zend.com/store/products/zend-platform/index.php"&gt;PHP&lt;br /&gt;    accelerator&lt;/a&gt;; the act of compiling the code accounts for more than half&lt;br /&gt;    of a Drupal page request. Functions are therefore defined inside other&lt;br /&gt;    functions in Drupal, with respect to the runtime scope. This is perfectly&lt;br /&gt;    legal. However, PHP does not allow the same kind of nesting with class&lt;br /&gt;    declarations. This means that the inclusion of files defining classes must&lt;br /&gt;    be "top-level," and not inside any function, which leads either to slower&lt;br /&gt;    code (always including the files defining classes) or a large amount of&lt;br /&gt;    logic in the main index.php file.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Finally, using classes to implement Drupal constructs is difficult due&lt;br /&gt;    to the use of some advanced object-oriented design patterns used by Drupal&lt;br /&gt;    itself. While this may sound self-contradictory, it should become clear in&lt;br /&gt;    the following discussion that the lack of certain OOP constructs such as &lt;a&lt;br /&gt;    href="http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_4_section_7.html"&gt;Objective-C's&lt;br /&gt;    "categories"&lt;/a&gt; in PHP would mean that implementing some Drupal mechanisms&lt;br /&gt;    (such as the &lt;a href="http://api.drupal.org/api/group/themeable"&gt;theme&lt;br /&gt;    system&lt;/a&gt;) would be more complicated using classes than using&lt;br /&gt;    functions.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h2&gt;OOP Concepts in Drupal&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Despite the lack of explicitly-declared classes in Drupal, many&lt;br /&gt;    object-oriented paradigms are still used in its design. There are many sets&lt;br /&gt;    of "essential features" that are said to be necessary to classify a system&lt;br /&gt;    as object-oriented; we will look at one of the &lt;a&lt;br /&gt;    href="http://en.wikipedia.org/wiki/Object-oriented_programming"&gt;more&lt;br /&gt;    popular definitions&lt;/a&gt; and examine some ways in which Drupal exhibits&lt;br /&gt;    those characteristics.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Objects&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;There are many constructs in Drupal that fit the description of an&lt;br /&gt;    "object". Some of the more prominent Drupal components that could be&lt;br /&gt;    considered objects are modules, themes, nodes, and users.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Nodes are the basic content building blocks of a Drupal site, and&lt;br /&gt;    bundle together the data that makes up a "page" or "story" on a typical&lt;br /&gt;    site. The methods that operate on this object are defined in node.module,&lt;br /&gt;    usually called by the node_invoke() function. User objects similarly&lt;br /&gt;    package data together, bringing together information about each account on&lt;br /&gt;    the site, profile information, and session tracking. In both cases, the&lt;br /&gt;    data structure is defined by a database table instead of a class. Drupal&lt;br /&gt;    exploits the relational nature of its supported databases to allow other&lt;br /&gt;    modules to extend the objects with additional data fields.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Modules and themes are object-like as well, filling the "controller"&lt;br /&gt;    role in many ways. Each module is a source file, but also bundles together&lt;br /&gt;    related functions and follows a pattern of defining Drupal hooks.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Abstraction&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Drupal's &lt;a href="http://api.drupal.org/api/group/hooks"&gt;hook&lt;br /&gt;    system&lt;/a&gt; is the basis for its interface abstraction. Hooks define the&lt;br /&gt;    operations that can be performed on or by a module. If a module implements&lt;br /&gt;    a hook, it enters into a contract to perform a particular task when the&lt;br /&gt;    hook is invoked. The calling code need not know anything else about the&lt;br /&gt;    module or the way the hook is implemented in order to get useful work done&lt;br /&gt;    by invoking the hook.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Encapsulation&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Like most other object-oriented systems, Drupal does not have a way of&lt;br /&gt;    strictly limiting access to an object's inner workings, but rather relies&lt;br /&gt;    on convention to accomplish this. Since Drupal code is based around&lt;br /&gt;    functions, which share a single namespace, this namespace is subdivided by&lt;br /&gt;    the use of prefixes. By following this simple convention, each module can&lt;br /&gt;    declare its own functions and variables without the worry of conflict with&lt;br /&gt;    others.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Convention also delineates the public API of a class from its internal&lt;br /&gt;    implementation. Internal functions are prefixed by an underscore to&lt;br /&gt;    indicate that they should not be called by outside modules. For example,&lt;br /&gt;    _user_categories() is a private function which is subject to change without&lt;br /&gt;    notice, while user_save() is part of the public interface to the user&lt;br /&gt;    object and can be called with the expectation that the user object will be&lt;br /&gt;    saved to the database (even though the method of doing this is&lt;br /&gt;    private).&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Polymorphism&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Nodes are polymorphic in the classical sense. If a module needs to&lt;br /&gt;    display a node, for example, it can call node_view() on that node to get an&lt;br /&gt;    HTML representation. The actual rendering, though, will depend on which&lt;br /&gt;    type of node is passed to the function; this is directly analogous to&lt;br /&gt;    having the class of an object determine its behavior when a message is sent&lt;br /&gt;    to it. Drupal itself handles the same introspection tasks required of an&lt;br /&gt;    OOP language's runtime library.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Furthermore, the rendering of the node in this example can be affected&lt;br /&gt;    by the active theme. Themes are polymorphic in the same way; the theme is&lt;br /&gt;    passed a "render this node" message, and responds to it in a different way&lt;br /&gt;    depending on the implementation of the active theme, though the interface&lt;br /&gt;    is constant.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Inheritance&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Modules and themes can define whatever functions they please. However,&lt;br /&gt;    they can both be thought to inherit their behavior from an abstract base&lt;br /&gt;    class. In the case of themes, the behavior of this class is determined by&lt;br /&gt;    the functions in theme.inc; if a theme does not override a function defined&lt;br /&gt;    there, the default rendering of an interface component is used, but the&lt;br /&gt;    theme can instead provide its own rendering. Modules similarly have the&lt;br /&gt;    selection of all Drupal hooks to override at will, and may pick and choose&lt;br /&gt;    which ones to implement.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h2&gt;Design Patterns in Drupal&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Much of Drupal's internal structure is more complicated than simple&lt;br /&gt;    inheritance and message passing, however. The more interesting features of&lt;br /&gt;    the system result from using established software design patterns. Many of&lt;br /&gt;    the patterns detailed in the seminal Gang of Four &lt;a&lt;br /&gt;    href="http://en.wikipedia.org/wiki/Design_Patterns"&gt;Design Patterns&lt;br /&gt;    book&lt;/a&gt; can be observed in Drupal, for instance.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Singleton&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;If we are to think of modules and themes as objects, then they follow&lt;br /&gt;    the singleton pattern. In general these objects do not encapsulate data;&lt;br /&gt;    what separates one module from another is the set of functions it contains,&lt;br /&gt;    so it should be thought of as a class with a singleton instance.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Decorator&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Drupal makes extensive use of the decorator pattern. The polymorphism&lt;br /&gt;    of node objects was discussed earlier, but this is only a small piece of&lt;br /&gt;    the power of the node system. More interesting is the use of&lt;br /&gt;    hook_nodeapi(), which allows arbitrary modules to extend the behavior of&lt;br /&gt;    all nodes. &lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;This feature allows for a wide variety of behaviors to be added to&lt;br /&gt;    nodes without the need for subclassing. For instance, a basic story node&lt;br /&gt;    has only a few pieces of associated data: title, author, body, teaser, and&lt;br /&gt;    a handful of metadata. A common need is for files to be uploaded and&lt;br /&gt;    attached to a node, so one could design a new node type that had the story&lt;br /&gt;    node's features plus the ability to attach files. Drupal's upload module&lt;br /&gt;    satisfies this need in a much more modular fashion by using nodeAPI to&lt;br /&gt;    grant every node that requests it the ability to have attached files.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;This behavior could be imitated by the use of decorators, wrapping them&lt;br /&gt;    around each node object. More simply, languages that support categories,&lt;br /&gt;    like Objective-C, could augment the common base class of all node objects&lt;br /&gt;    to add the new behavior. Drupal's implementation is a simple ramification&lt;br /&gt;    of the hook system and the presence of node_invoke_all().&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Observer&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;The above interaction is also similar to the use of observers in&lt;br /&gt;    object-oriented systems. This Observer pattern is pervasive throughout&lt;br /&gt;    Drupal. When a modification is made to a vocabulary in Drupal's taxonomy&lt;br /&gt;    system, the taxonomy hook is called in all modules that implement it. By&lt;br /&gt;    implementing the hook, they have registered as observers of the vocabulary&lt;br /&gt;    object; any changes to it can then be acted on as is appropriate.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Bridge&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;The Drupal &lt;a&lt;br /&gt;    href="http://api.drupal.org/api/group/database"&gt;database abstraction&lt;br /&gt;    layer&lt;/a&gt; is implemented in a fashion similar to the Bridge design pattern.&lt;br /&gt;    Modules need to be written in a way that is independent of the database&lt;br /&gt;    system being used, and the abstraction layer provides for this. New&lt;br /&gt;    database layers can be written that conform to the API defined by the&lt;br /&gt;    bridge, adding support for additional database systems without the need to&lt;br /&gt;    modify module code.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Chain of Responsibility&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Drupal's &lt;a href="http://api.drupal.org/api/group/menu"&gt;menu&lt;br /&gt;    system&lt;/a&gt; follows the Chain of Responsibility pattern. On each page&lt;br /&gt;    request, the menu system determines whether there is a module to handle the&lt;br /&gt;    request, whether the user has access to the resource requested, and which&lt;br /&gt;    function will be called to do the work. To do this, a message is passed to&lt;br /&gt;    the menu item corresponding to the path of the request. If the menu item&lt;br /&gt;    cannot handle the request, it is passed up the chain. This continues until&lt;br /&gt;    a module handles the request, a module denies access to the user, or the&lt;br /&gt;    chain is exhausted.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Command&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Many of Drupal's hooks use the Command pattern to reduce the number of&lt;br /&gt;    functions that are necessary to implement, passing the operation as a&lt;br /&gt;    parameter along with the arguments. In fact, the hook system itself uses&lt;br /&gt;    this pattern, so that modules do not have to define every hook, but rather&lt;br /&gt;    just the ones they care to implement.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h2&gt;Why Not to Use Classes&lt;/h2&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;The above hopefully clarifies the ways in which Drupal embodies various&lt;br /&gt;    OOP concepts. Why, then, doesn't Drupal move in the direction of using&lt;br /&gt;    classes to solve these problems in the future? Some of the reasons are&lt;br /&gt;    historical, and were discussed earlier. Others, though, become clearer now&lt;br /&gt;    that we have stepped through some of the design patterns used in&lt;br /&gt;    Drupal.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;A good example is the extensibility of the theme system. A theme&lt;br /&gt;    defines functions for each of the interface elements it wants to display in&lt;br /&gt;    a special way. As noted earlier, this makes themes seem like a good&lt;br /&gt;    candidate to inherit from an abstract base class that defines the default&lt;br /&gt;    rendering of the elements.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;What happens, though, when a module is added that adds a new interface&lt;br /&gt;    element? The theme should be able to override the rendering of this element&lt;br /&gt;    as well, but if a base class is defined, the new module has no way of&lt;br /&gt;    adding another method to that class. Complicated patterns could be set up&lt;br /&gt;    to emulate this behavior, but Drupal's theme architecture quite elegantly&lt;br /&gt;    handles the situation using its own function dispatch system. In this case&lt;br /&gt;    and others like it, the classes that on the surface simplify the system end&lt;br /&gt;    up serving to make it more cumbersome and difficult to extend.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Room for Improvement&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;While Drupal does reflect many object-oriented practices, there are some&lt;br /&gt;    aspects of OOP that could be brought to bear on the project in more&lt;br /&gt;    powerful ways.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Encapsulation, while adequate in theory, is not applied consistently&lt;br /&gt;    enough across the code base. Modules should more rigorously define which&lt;br /&gt;    functions are public and which are private; the tendency right now is to&lt;br /&gt;    publish most functions in the public namespace even if the interface is&lt;br /&gt;    volatile. This problem is exacerbated by Drupal's policy of forgoing&lt;br /&gt;    backward compatibility in exchange for cleaner APIs whenever necessary.&lt;br /&gt;    This policy has led to some very good code, but would need to be excercised&lt;br /&gt;    much less often if better encapsulation conventions were followed.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Inheritance is also weak in the system. While, as noted above, all&lt;br /&gt;    modules share a common set of behavior, it is difficult to extend this to&lt;br /&gt;    new modules. One can create new modules easily that augment the behavior of&lt;br /&gt;    existing ones, but there is not a way to override just some of a module's&lt;br /&gt;    behavior. The impact of this can be marginalized by breaking large modules&lt;br /&gt;    into smaller "a la carte" bundles of functionality, so that undesired&lt;br /&gt;    aspects of a module may be more easily left out of the system.&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;    &lt;h3&gt;Other Paradigms&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;    &lt;p&gt;Drupal is on the surface a procedural system, because it is built in a&lt;br /&gt;    procedural language (PHP without classes). The paradigm behind a piece of&lt;br /&gt;    software is not entirely dependent on its representation in code, however.&lt;br /&gt;    Drupal is not afraid to borrow concepts from many disparate programming&lt;br /&gt;    paradigms where it is convenient. A great deal of the power of Drupal comes&lt;br /&gt;    from its underlying relational database, and relational programming&lt;br /&gt;    techniques that mirror it. The fact that Drupal's work, much like that of&lt;br /&gt;    any web application, consists of many reactions to discrete and rapid page&lt;br /&gt;    requests should make the behavior of the system resonate with proponents of&lt;br /&gt;    event-driven programming. To an aspect-oriented programmer, the invocation&lt;br /&gt;    of hooks in arbitrary modules may look strikingly similar to a pointcut.&lt;br /&gt;    And, as should be abundantly clear by now, Drupal is no stranger to&lt;br /&gt;    object-oriented concepts either.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-1805912835954487815?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=btgbpEiz3WA:Aaj1rsi9WeY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=btgbpEiz3WA:Aaj1rsi9WeY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=btgbpEiz3WA:Aaj1rsi9WeY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/btgbpEiz3WA" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-07-13T14:56:41.187+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/07/drupal-programming-from-object-oriented.html</feedburner:origLink></item><item><title>heshanonline launched</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/JX0YkjdPdNc/heshanonline-launched.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Wed, 11 Jun 2008 20:44:23 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-3117940750022976193</guid><description>Hi All&lt;br /&gt;I have launched my new personnel web site www.heshanonline.tk.&lt;br /&gt;Give your feedback,&lt;br /&gt;-Heshan&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-3117940750022976193?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=JX0YkjdPdNc:1eDS5OKZOKM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=JX0YkjdPdNc:1eDS5OKZOKM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=JX0YkjdPdNc:1eDS5OKZOKM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/JX0YkjdPdNc" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-12T09:14:23.110+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/06/heshanonline-launched.html</feedburner:origLink></item><item><title>DBD::mysql - MySQL driver for the Perl5 Database Interface (DBI)</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/IZrvWgihZl4/dbdmysql-mysql-driver-for-perl5.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sat, 10 May 2008 07:13:45 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-7197301874344619845</guid><description>&lt;h1&gt;&lt;a class="u" href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#___top" title="click to go to top of document" name="NAME"&gt;NAME &lt;img alt="^" src="http://search.cpan.org/s/img/up.gif" /&gt;&lt;/a&gt;&lt;/h1&gt;  &lt;p&gt;DBD::mysql - MySQL driver for the Perl5 Database Interface (DBI)&lt;/p&gt;  &lt;h1&gt;&lt;a class="u" href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#___top" title="click to go to top of document" name="SYNOPSIS"&gt;SYNOPSIS &lt;img alt="^" src="http://search.cpan.org/s/img/up.gif" /&gt;&lt;/a&gt;&lt;/h1&gt;  &lt;pre&gt;    use DBI;&lt;br /&gt;&lt;br /&gt;   $dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";&lt;br /&gt;&lt;br /&gt;   $dbh = DBI-&gt;connect($dsn, $user, $password);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   $drh = DBI-&gt;install_driver("mysql");&lt;br /&gt;   @databases = DBI-&gt;data_sources("mysql");&lt;br /&gt;      or&lt;br /&gt;   @databases = DBI-&gt;data_sources("mysql",&lt;br /&gt;                                  {"host" =&gt; $host, "port" =&gt; $port});&lt;br /&gt;&lt;br /&gt;   $sth = $dbh-&gt;prepare("SELECT * FROM foo WHERE bla");&lt;br /&gt;      or&lt;br /&gt;   $sth = $dbh-&gt;prepare("LISTFIELDS $table");&lt;br /&gt;      or&lt;br /&gt;   $sth = $dbh-&gt;prepare("LISTINDEX $table $index");&lt;br /&gt;   $sth-&gt;execute;&lt;br /&gt;   $numRows = $sth-&gt;rows;&lt;br /&gt;   $numFields = $sth-&gt;{'NUM_OF_FIELDS'};&lt;br /&gt;   $sth-&gt;finish;&lt;br /&gt;&lt;br /&gt;   $rc = $drh-&gt;func('createdb', $database, $host, $user, $password, 'admin');&lt;br /&gt;   $rc = $drh-&gt;func('dropdb', $database, $host, $user, $password, 'admin');&lt;br /&gt;   $rc = $drh-&gt;func('shutdown', $host, $user, $password, 'admin');&lt;br /&gt;   $rc = $drh-&gt;func('reload', $host, $user, $password, 'admin');&lt;br /&gt;&lt;br /&gt;   $rc = $dbh-&gt;func('createdb', $database, 'admin');&lt;br /&gt;   $rc = $dbh-&gt;func('dropdb', $database, 'admin');&lt;br /&gt;   $rc = $dbh-&gt;func('shutdown', 'admin');&lt;br /&gt;   $rc = $dbh-&gt;func('reload', 'admin');&lt;/pre&gt;  &lt;h1&gt;&lt;a class="u" href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#___top" title="click to go to top of document" name="EXAMPLE"&gt;EXAMPLE &lt;img alt="^" src="http://search.cpan.org/s/img/up.gif" /&gt;&lt;/a&gt;&lt;/h1&gt;  &lt;pre&gt;  #!/usr/bin/perl&lt;br /&gt;&lt;br /&gt; use strict;&lt;br /&gt; use DBI();&lt;br /&gt;&lt;br /&gt; # Connect to the database.&lt;br /&gt; my $dbh = DBI-&gt;connect("DBI:mysql:database=test;host=localhost",&lt;br /&gt;                        "joe", "joe's password",&lt;br /&gt;                        {'RaiseError' =&gt; 1});&lt;br /&gt;&lt;br /&gt; # Drop table 'foo'. This may fail, if 'foo' doesn't exist.&lt;br /&gt; # Thus we put an eval around it.&lt;br /&gt; eval { $dbh-&gt;do("DROP TABLE foo") };&lt;br /&gt; print "Dropping foo failed: $@\n" if $@;&lt;br /&gt;&lt;br /&gt; # Create a new table 'foo'. This must not fail, thus we don't&lt;br /&gt; # catch errors.&lt;br /&gt; $dbh-&gt;do("CREATE TABLE foo (id INTEGER, name VARCHAR(20))");&lt;br /&gt;&lt;br /&gt; # INSERT some data into 'foo'. We are using $dbh-&gt;quote() for&lt;br /&gt; # quoting the name.&lt;br /&gt; $dbh-&gt;do("INSERT INTO foo VALUES (1, " . $dbh-&gt;quote("Tim") . ")");&lt;br /&gt;&lt;br /&gt; # Same thing, but using placeholders&lt;br /&gt; $dbh-&gt;do("INSERT INTO foo VALUES (?, ?)", undef, 2, "Jochen");&lt;br /&gt;&lt;br /&gt; # Now retrieve data from the table.&lt;br /&gt; my $sth = $dbh-&gt;prepare("SELECT * FROM foo");&lt;br /&gt; $sth-&gt;execute();&lt;br /&gt; while (my $ref = $sth-&gt;fetchrow_hashref()) {&lt;br /&gt;   print "Found a row: id = $ref-&gt;{'id'}, name = $ref-&gt;{'name'}\n";&lt;br /&gt; }&lt;br /&gt; $sth-&gt;finish();&lt;br /&gt;&lt;br /&gt; # Disconnect from the database.&lt;br /&gt; $dbh-&gt;disconnect();&lt;/pre&gt;  &lt;h1&gt;&lt;a class="u" href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#___top" title="click to go to top of document" name="DESCRIPTION"&gt;DESCRIPTION &lt;img alt="^" src="http://search.cpan.org/s/img/up.gif" /&gt;&lt;/a&gt;&lt;/h1&gt;  &lt;p&gt;&lt;b&gt;DBD::mysql&lt;/b&gt; is the Perl5 Database Interface driver for the MySQL database. In other words: DBD::mysql is an interface between the Perl programming language and the MySQL programming API that comes with the MySQL relational database management system. Most functions provided by this programming API are supported. Some rarely used functions are missing, mainly because noone ever requested them. :-)&lt;/p&gt;  &lt;p&gt;In what follows we first discuss the use of DBD::mysql, because this is what you will need the most. For installation, see the sections on &lt;a href="http://search.cpan.org/perldoc?INSTALLATION" class="podlinkpod"&gt;INSTALLATION&lt;/a&gt;, and &lt;a href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#WIN32_INSTALLATION" class="podlinkpod"&gt;"WIN32 INSTALLATION"&lt;/a&gt; below. See &lt;a href="http://search.cpan.org/perldoc?EXAMPLE" class="podlinkpod"&gt;EXAMPLE&lt;/a&gt; for a simple example above.&lt;/p&gt;  &lt;p&gt;From perl you activate the interface with the statement&lt;/p&gt;  &lt;pre&gt;    use DBI;&lt;/pre&gt;  &lt;p&gt;After that you can connect to multiple MySQL database servers and send multiple queries to any of them via a simple object oriented interface. Two types of objects are available: database handles and statement handles. Perl returns a database handle to the connect method like so:&lt;/p&gt;  &lt;pre&gt;  $dbh = DBI-&gt;connect("DBI:mysql:database=$db;host=$host",&lt;br /&gt;                     $user, $password, {RaiseError =&gt; 1});&lt;/pre&gt;  &lt;p&gt;Once you have connected to a database, you can can execute SQL statements with:&lt;/p&gt;  &lt;pre&gt;  my $query = sprintf("INSERT INTO foo VALUES (%d, %s)",&lt;br /&gt;                     $number, $dbh-&gt;quote("name"));&lt;br /&gt; $dbh-&gt;do($query);&lt;/pre&gt;  &lt;p&gt;See &lt;a&gt;DBI(3)&lt;/a&gt; for details on the quote and do methods. An alternative approach is&lt;/p&gt;  &lt;pre&gt;  $dbh-&gt;do("INSERT INTO foo VALUES (?, ?)", undef,&lt;br /&gt;          $number, $name);&lt;/pre&gt;  &lt;p&gt;in which case the quote method is executed automatically. See also the bind_param method in &lt;a&gt;DBI(3)&lt;/a&gt;. See &lt;a href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#DATABASE_HANDLES" class="podlinkpod"&gt;"DATABASE HANDLES"&lt;/a&gt; below for more details on database handles.&lt;/p&gt;  &lt;p&gt;If you want to retrieve results, you need to create a so-called statement handle with:&lt;/p&gt;  &lt;pre&gt;  $sth = $dbh-&gt;prepare("SELECT * FROM $table");&lt;br /&gt; $sth-&gt;execute();&lt;/pre&gt;  &lt;p&gt;This statement handle can be used for multiple things. First of all you can retreive a row of data:&lt;/p&gt;  &lt;pre&gt;  my $row = $sth-&gt;fetchrow_hashref();&lt;/pre&gt;  &lt;p&gt;If your table has columns ID and NAME, then $row will be hash ref with keys ID and NAME. See &lt;a href="http://search.cpan.org/%7Ecapttofu/DBD-mysql-3.0008/lib/DBD/mysql.pm#STATEMENT_HANDLES" class="podlinkpod"&gt;"STATEMENT HANDLES"&lt;/a&gt; below for more details on statement handles.&lt;/p&gt;  &lt;p&gt;But now for a more formal approach:&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-7197301874344619845?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=IZrvWgihZl4:AgqkBeU0glo:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=IZrvWgihZl4:AgqkBeU0glo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=IZrvWgihZl4:AgqkBeU0glo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/IZrvWgihZl4" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-10T19:43:45.403+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/05/dbdmysql-mysql-driver-for-perl5.html</feedburner:origLink></item><item><title>How does MediaWiki work?</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/NFAi4--TbZc/how-does-mediawiki-work.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Sat, 10 May 2008 07:08:07 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-371486628641667929</guid><description>&lt;h1 class="firstHeading"&gt;&lt;br /&gt;&lt;/h1&gt;       &lt;h3 id="siteSub"&gt;From MediaWiki.org&lt;/h3&gt;                 &lt;!-- start content --&gt;    &lt;div style="border: 1px solid rgb(170, 170, 170); padding: 0px; background: rgb(249, 249, 249) none repeat scroll 0% 50%; float: right; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; margin-left: 5px; margin-bottom: 3px; width: 17em;"&gt; &lt;div style="border-bottom: 1px solid rgb(170, 170, 170); padding: 0.4em; font-size: 105%; line-height: 120%; background-color: rgb(238, 238, 238);"&gt;&lt;b&gt;&lt;a href="http://www.mediawiki.org/wiki/MediaWiki" title="MediaWiki"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;  &lt;/div&gt; &lt;div class="floatleft"&gt;&lt;span&gt;&lt;a href="http://www.mediawiki.org/wiki/Image:Wikipedia-logo-en.png" class="image" title="Wikipedia logo"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt; &lt;p&gt;You probably know &lt;a href="http://en.wikipedia.org/wiki/Wikipedia" class="extiw" title="en:Wikipedia"&gt;Wikipedia&lt;/a&gt;, the free encyclopedia, and may possibly be a little bit confused by similar, but different, words such as Wiki, Wikimedia or &lt;b&gt;MediaWiki&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;To avoid a possible confusion between the words you may first want to read the &lt;a href="http://meta.wikimedia.org/wiki/Names" class="extiw" title="meta:Names"&gt;article about the names&lt;/a&gt; where the differences are explained.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="General_Overview" id="General_Overview"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;&lt;span class="mw-headline"&gt;General Overview&lt;/span&gt;&lt;/h2&gt; &lt;div class="thumb tleft"&gt; &lt;div class="thumbinner" style="width: 182px;"&gt;&lt;a href="http://www.mediawiki.org/wiki/Image:Wikimedia_Servers.svg" class="image" title="MediaWiki can be used in large enterprise server farms as in the Wikimedia Foundation cluster."&gt;&lt;img alt="MediaWiki can be used in large enterprise server farms as in the Wikimedia Foundation cluster." src="http://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Wikimedia_Servers.svg/180px-Wikimedia_Servers.svg.png" class="thumbimage" border="0" height="83" width="180" /&gt;&lt;/a&gt; &lt;div class="thumbcaption"&gt; &lt;div class="magnify"&gt;&lt;a href="http://www.mediawiki.org/wiki/Image:Wikimedia_Servers.svg" class="internal" title="Enlarge"&gt;&lt;img src="http://www.mediawiki.org/skins-1.5/common/images/magnify-clip.png" alt="" height="11" width="15" /&gt;&lt;/a&gt;&lt;/div&gt; MediaWiki can be used in large enterprise server farms as in the Wikimedia Foundation cluster.&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;MediaWiki is &lt;a href="http://en.wikipedia.org/wiki/Free_software" class="extiw" title="en:Free_software"&gt;free&lt;/a&gt; server-based software which is licensed under the &lt;a href="http://en.wikipedia.org/wiki/GNU_General_Public_License" class="extiw" title="en:GNU_General_Public_License"&gt;GNU General Public License&lt;/a&gt; (GPL). It's designed to be run on a large server farm for a website that gets millions of hits per day. MediaWiki is an extremely powerful, scaleable software and a feature-rich wiki implementation, that uses &lt;a href="http://en.wikipedia.org/wiki/PHP" class="extiw" title="en:PHP"&gt;PHP&lt;/a&gt; to process and display data stored in its &lt;a href="http://en.wikipedia.org/wiki/MySQL" class="extiw" title="en:MySQL"&gt;MySQL&lt;/a&gt; database.&lt;/p&gt; &lt;p&gt;Pages use MediaWiki's &lt;a href="http://en.wikipedia.org/wiki/Wikitext" class="extiw" title="en:Wikitext"&gt;wikitext format&lt;/a&gt;, so that users without knowledge of &lt;a href="http://en.wikipedia.org/wiki/XHTML" class="extiw" title="en:XHTML"&gt;XHTML&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" class="extiw" title="en:Cascading_Style_Sheets"&gt;CSS&lt;/a&gt; can edit them easily.&lt;/p&gt; &lt;p&gt;When a user submits an edit to a page, MediaWiki writes it to the database, but without deleting the previous versions of the page, thus allowing easy reverts in case of vandalism or spamming. MediaWiki can manage image and multimedia files, too, which are stored in the filesystem. For large wikis with lots of users, MediaWiki supports caching and can be easily coupled with Squid proxy server software.&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="Try_out_Wikitext" id="Try_out_Wikitext"&gt;&lt;/a&gt;&lt;/p&gt; &lt;h2&gt;&lt;span class="mw-headline"&gt;Try out Wikitext&lt;/span&gt;&lt;/h2&gt; &lt;div class="thumb tleft"&gt; &lt;div class="thumbinner" style="width: 182px;"&gt;&lt;a href="http://www.mediawiki.org/wiki/Image:Wikitext-wiki_markup-wikipedia.png" class="image" title="Basic wikitext (wiki markup)"&gt;&lt;img alt="Basic wikitext (wiki markup)" src="http://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Wikitext-wiki_markup-wikipedia.png/180px-Wikitext-wiki_markup-wikipedia.png" class="thumbimage" border="0" height="87" width="180" /&gt;&lt;/a&gt; &lt;div class="thumbcaption"&gt; &lt;div class="magnify"&gt;&lt;a href="http://www.mediawiki.org/wiki/Image:Wikitext-wiki_markup-wikipedia.png" class="internal" title="Enlarge"&gt;&lt;img src="http://www.mediawiki.org/skins-1.5/common/images/magnify-clip.png" alt="" height="11" width="15" /&gt;&lt;/a&gt;&lt;/div&gt; Basic wikitext (wiki markup)&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;Yes, you can easily modify pages and you can (temporarily) publish dummy sentences, and you can even (temporarily) completely destroy a page in a wiki. You don't need to have any programming skills to do this.&lt;/p&gt; &lt;p&gt;We suggest you exercise yourself within our &lt;a href="http://www.mediawiki.org/wiki/Sandbox" title="Sandbox"&gt;sandbox&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;You can also look up the &lt;a href="http://commons.wikimedia.org/wiki/Image:Cheatsheet-en.png" class="extiw" title="commons:Image:Cheatsheet-en.png"&gt;cheat sheet&lt;/a&gt; with basic formatting commands.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-371486628641667929?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=NFAi4--TbZc:nELfumg6FKU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=NFAi4--TbZc:nELfumg6FKU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=NFAi4--TbZc:nELfumg6FKU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/NFAi4--TbZc" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-10T19:38:07.731+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/05/how-does-mediawiki-work.html</feedburner:origLink></item><item><title>Access Parents Variables from Child Thread + Perl</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/u0d_6lQ17ng/access-parents-variables-from-child.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Thu, 08 May 2008 00:18:28 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-2916785623693763962</guid><description>&lt;h1&gt;NAME&lt;/h1&gt; &lt;p&gt;threads::shared - Perl extension for sharing data structures between threads&lt;/p&gt; &lt;a name="VERSION"&gt;&lt;/a&gt;&lt;h1&gt;VERSION&lt;/h1&gt; &lt;p&gt;This document describes threads::shared version 1.14&lt;/p&gt; &lt;a name="SYNOPSIS"&gt;&lt;/a&gt;&lt;h1&gt;SYNOPSIS&lt;/h1&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/use.html"&gt;use&lt;/a&gt; &lt;span class="w"&gt;threads&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/use.html"&gt;use&lt;/a&gt; &lt;span class="w"&gt;threads::shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$var&lt;/span&gt; &lt;span class="co"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$var&lt;/span&gt; = &lt;span class="i"&gt;$scalar_value&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$var&lt;/span&gt; = &lt;span class="i"&gt;$shared_ref_value&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$var&lt;/span&gt; = &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$simple_unshared_ref_value&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$scalar&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="i"&gt;@array&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="i"&gt;%hash&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$scalar&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;@array&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;%hash&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$bar&lt;/span&gt; = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$hash&lt;/span&gt;{&lt;span class="w"&gt;bar&lt;/span&gt;} = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;span class="s"&gt;{&lt;/span&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;%hash&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt; ...  &lt;span class="s"&gt;}&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;span class="i"&gt;cond_wait&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$scalar&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;cond_timedwait&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$scalar&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/time.html"&gt;time&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt; + &lt;span class="n"&gt;30&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;cond_broadcast&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;@array&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;cond_signal&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;%hash&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$lockvar&lt;/span&gt; &lt;span class="co"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="c"&gt;# condition var != lock var&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;cond_wait&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="i"&gt;$lockvar&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;cond_timedwait&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/time.html"&gt;time&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;+&lt;span class="n"&gt;30&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="i"&gt;$lockvar&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;a name="DESCRIPTION"&gt;&lt;/a&gt;&lt;h1&gt;DESCRIPTION&lt;/h1&gt; &lt;p&gt;By default, variables are private to each thread, and each newly created thread gets a private copy of each existing variable.  This module allows you to share variables across different threads (and pseudo-forks on Win32).  It is used together with the &lt;a href="http://perldoc.perl.org/threads.html"&gt;threads&lt;/a&gt; module.&lt;/p&gt; &lt;a name="EXPORT"&gt;&lt;/a&gt;&lt;h1&gt;EXPORT&lt;/h1&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;span class="w"&gt;share&lt;/span&gt;&lt;/code&gt; , &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt; , &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_timedwait&lt;/span&gt;&lt;/code&gt; , &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_signal&lt;/span&gt;&lt;/code&gt; , &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_broadcast&lt;/span&gt;&lt;/code&gt; , &lt;code class="inline"&gt;&lt;span class="w"&gt;is_shared&lt;/span&gt;&lt;/code&gt; &lt;/p&gt; &lt;p&gt;Note that if this module is imported when &lt;a href="http://perldoc.perl.org/threads.html"&gt;threads&lt;/a&gt; has not yet been loaded, then these functions all become no-ops.  This makes it possible to write modules that will work in both threaded and non-threaded environments.&lt;/p&gt; &lt;a name="FUNCTIONS"&gt;&lt;/a&gt;&lt;h1&gt;FUNCTIONS&lt;/h1&gt; &lt;ul&gt;&lt;li&gt;&lt;a name="share-VARIABLE"&gt;&lt;/a&gt;&lt;b&gt;share VARIABLE&lt;/b&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;span class="w"&gt;share&lt;/span&gt;&lt;/code&gt;  takes a value and marks it as shared. You can share a scalar, array, hash, scalar ref, array ref, or hash ref.  &lt;code class="inline"&gt;&lt;span class="w"&gt;share&lt;/span&gt;&lt;/code&gt;  will return the shared rvalue, but always as a reference.&lt;/p&gt; &lt;p&gt;A variable can also be marked as shared at compile time by using the &lt;code class="inline"&gt;&lt;span class="j"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;/code&gt;  attribute: &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$var&lt;/span&gt; &lt;span class="co"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/code&gt; .&lt;/p&gt; &lt;p&gt;Due to problems with Perl's prototyping, if you want to share a newly created reference, you need to use the &lt;code class="inline"&gt;&lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt;  and &lt;code class="inline"&gt;&lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt;  syntax.&lt;/p&gt; &lt;p&gt;The only values that can be assigned to a shared scalar are other scalar values, or shared refs:&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$var&lt;/span&gt; &lt;span class="co"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$var&lt;/span&gt; = &lt;span class="n"&gt;1&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;              &lt;span class="c"&gt;# ok&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$var&lt;/span&gt; = &lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;             &lt;span class="c"&gt;# error&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$var&lt;/span&gt; = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;     &lt;span class="c"&gt;# ok&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;span class="w"&gt;share&lt;/span&gt;&lt;/code&gt;  will traverse up references exactly &lt;i&gt;one&lt;/i&gt; level.  &lt;code class="inline"&gt;&lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;\&lt;span class="i"&gt;$a&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt;  is equivalent to &lt;code class="inline"&gt;&lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$a&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt; , while &lt;code class="inline"&gt;&lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;\\&lt;span class="i"&gt;$a&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt;  is not.  This means that you must create nested shared data structures by first creating individual shared leaf nodes, and then adding them to a shared hash or array.&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;%hash&lt;/span&gt; &lt;span class="co"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$hash&lt;/span&gt;{&lt;span class="q"&gt;'meaning'&lt;/span&gt;} = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;[&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$hash&lt;/span&gt;{&lt;span class="q"&gt;'meaning'&lt;/span&gt;}[&lt;span class="n"&gt;0&lt;/span&gt;] = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$hash&lt;/span&gt;{&lt;span class="q"&gt;'meaning'&lt;/span&gt;}[&lt;span class="n"&gt;0&lt;/span&gt;]{&lt;span class="q"&gt;'life'&lt;/span&gt;} = &lt;span class="n"&gt;42&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="is_shared-VARIABLE"&gt;&lt;/a&gt;&lt;b&gt;is_shared VARIABLE&lt;/b&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;span class="w"&gt;is_shared&lt;/span&gt;&lt;/code&gt;  checks if the specified variable is shared or not.  If shared, returns the variable's internal ID (similar to &lt;a href="http://perldoc.perl.org/Scalar/Util.html#refaddr-EXPR"&gt;refaddr()&lt;/a&gt;).  Otherwise, returns &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/undef.html"&gt;undef&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt; &lt;pre class="verbatim"&gt;  if &lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;is_shared&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt; &lt;span class="s"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;a class="l_k" href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="q"&gt;"\$var is shared\n"&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="s"&gt;}&lt;/span&gt; else &lt;span class="s"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;a class="l_k" href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="q"&gt;"\$var is not shared\n"&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="s"&gt;}&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="lock-VARIABLE"&gt;&lt;/a&gt;&lt;b&gt;lock VARIABLE&lt;/b&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;/code&gt; places a lock on a variable until the lock goes out of scope.  If the variable is locked by another thread, the &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;/code&gt; call will block until it's available.  Multiple calls to &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;/code&gt; by the same thread from within dynamically nested scopes are safe -- the variable will remain locked until the outermost lock on the variable goes out of scope.&lt;/p&gt; &lt;p&gt;Locking a container object, such as a hash or array, doesn't lock the elements of that container. For example, if a thread does a &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock(@a)&lt;/a&gt;&lt;/code&gt;, any other thread doing a &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock($a[12])&lt;/a&gt;&lt;/code&gt; won't block.&lt;/p&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock()&lt;/a&gt;&lt;/code&gt; follows references exactly &lt;i&gt;one&lt;/i&gt; level.  &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock(\$a)&lt;/a&gt;&lt;/code&gt; is equivalent to &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock($a)&lt;/a&gt;&lt;/code&gt;, while &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock(\\$a)&lt;/a&gt;&lt;/code&gt; is not.&lt;/p&gt; &lt;p&gt;Note that you cannot explicitly unlock a variable; you can only wait for the lock to go out of scope.  This is most easily accomplished by locking the variable inside a block.&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$var&lt;/span&gt; &lt;span class="co"&gt;:&lt;/span&gt;&lt;span class="w"&gt;shared&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="s"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span class="c"&gt;# $var is locked from here to the end of the block&lt;/span&gt;&lt;br /&gt;     ...&lt;br /&gt; &lt;span class="s"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class="c"&gt;# $var is now unlocked&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;If you need more fine-grained control over shared variable access, see &lt;a href="http://perldoc.perl.org/Thread/Semaphore.html"&gt;Thread::Semaphore&lt;/a&gt;.&lt;/p&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="cond_wait-VARIABLE"&gt;&lt;/a&gt;&lt;b&gt;cond_wait VARIABLE&lt;/b&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="cond_wait-CONDVAR,-LOCKVAR"&gt;&lt;/a&gt;&lt;b&gt;cond_wait CONDVAR, LOCKVAR&lt;/b&gt; &lt;p&gt;The &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  function takes a &lt;b&gt;locked&lt;/b&gt; variable as a parameter, unlocks the variable, and blocks until another thread does a &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_signal&lt;/span&gt;&lt;/code&gt;  or &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_broadcast&lt;/span&gt;&lt;/code&gt;  for that same locked variable.  The variable that &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  blocked on is relocked after the &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  is satisfied.  If there are multiple threads &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt; ing on the same variable, all but one will re-block waiting to reacquire the lock on the variable. (So if you're only using &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  for synchronisation, give up the lock as soon as possible). The two actions of unlocking the variable and entering the blocked wait state are atomic, the two actions of exiting from the blocked wait state and re-locking the variable are not.&lt;/p&gt; &lt;p&gt;In its second form, &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  takes a shared, &lt;b&gt;unlocked&lt;/b&gt; variable followed by a shared, &lt;b&gt;locked&lt;/b&gt; variable.  The second variable is unlocked and thread execution suspended until another thread signals the first variable.&lt;/p&gt; &lt;p&gt;It is important to note that the variable can be notified even if no thread &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_signal&lt;/span&gt;&lt;/code&gt;  or &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_broadcast&lt;/span&gt;&lt;/code&gt;  on the variable.  It is therefore important to check the value of the variable and go back to waiting if the requirement is not fulfilled.  For example, to pause until a shared counter drops to zero:&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;span class="s"&gt;{&lt;/span&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$counter&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt; &lt;span class="i"&gt;cond_wait&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$count&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt; until &lt;span class="i"&gt;$counter&lt;/span&gt; == &lt;span class="n"&gt;0&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt; &lt;span class="s"&gt;}&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="cond_timedwait-VARIABLE,-ABS_TIMEOUT"&gt;&lt;/a&gt;&lt;b&gt;cond_timedwait VARIABLE, ABS_TIMEOUT&lt;/b&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="cond_timedwait-CONDVAR,-ABS_TIMEOUT,-LOCKVAR"&gt;&lt;/a&gt;&lt;b&gt;cond_timedwait CONDVAR, ABS_TIMEOUT, LOCKVAR&lt;/b&gt; &lt;p&gt;In its two-argument form, &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_timedwait&lt;/span&gt;&lt;/code&gt;  takes a &lt;b&gt;locked&lt;/b&gt; variable and an absolute timeout as parameters, unlocks the variable, and blocks until the timeout is reached or another thread signals the variable.  A false value is returned if the timeout is reached, and a true value otherwise.  In either case, the variable is re-locked upon return.&lt;/p&gt; &lt;p&gt;Like &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt; , this function may take a shared, &lt;b&gt;locked&lt;/b&gt; variable as an additional parameter; in this case the first parameter is an &lt;b&gt;unlocked&lt;/b&gt; condition variable protected by a distinct lock variable.&lt;/p&gt; &lt;p&gt;Again like &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt; , waking up and reacquiring the lock are not atomic, and you should always check your desired condition after this function returns.  Since the timeout is an absolute value, however, it does not have to be recalculated with each pass:&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$abs&lt;/span&gt; = &lt;a class="l_k" href="http://perldoc.perl.org/functions/time.html"&gt;time&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt; + &lt;span class="n"&gt;15&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; until &lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$ok&lt;/span&gt; = &lt;span class="i"&gt;desired_condition&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt; &lt;span class="s"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;a class="l_k" href="http://perldoc.perl.org/functions/last.html"&gt;last&lt;/a&gt; if !&lt;span class="i"&gt;cond_timedwait&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$var&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="i"&gt;$abs&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="s"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;span class="c"&gt;# we got it if $ok, otherwise we timed out!&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="cond_signal-VARIABLE"&gt;&lt;/a&gt;&lt;b&gt;cond_signal VARIABLE&lt;/b&gt; &lt;p&gt;The &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_signal&lt;/span&gt;&lt;/code&gt;  function takes a &lt;b&gt;locked&lt;/b&gt; variable as a parameter and unblocks one thread that's &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt; ing on that variable. If more than one thread is blocked in a &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  on that variable, only one (and which one is indeterminate) will be unblocked.&lt;/p&gt; &lt;p&gt;If there are no threads blocked in a &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  on the variable, the signal is discarded. By always locking before signaling, you can (with care), avoid signaling before another thread has entered cond_wait().&lt;/p&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;span class="w"&gt;cond_signal&lt;/span&gt;&lt;/code&gt;  will normally generate a warning if you attempt to use it on an unlocked variable. On the rare occasions where doing this may be sensible, you can suppress the warning with:&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;span class="s"&gt;{&lt;/span&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/no.html"&gt;no&lt;/a&gt; &lt;span class="w"&gt;warnings&lt;/span&gt; &lt;span class="q"&gt;'threads'&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt; &lt;span class="i"&gt;cond_signal&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt; &lt;span class="s"&gt;}&lt;/span&gt;&lt;/pre&gt; &lt;/li&gt;&lt;li&gt;&lt;a name="cond_broadcast-VARIABLE"&gt;&lt;/a&gt;&lt;b&gt;cond_broadcast VARIABLE&lt;/b&gt; &lt;p&gt;The &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_broadcast&lt;/span&gt;&lt;/code&gt;  function works similarly to &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_signal&lt;/span&gt;&lt;/code&gt; . &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_broadcast&lt;/span&gt;&lt;/code&gt; , though, will unblock &lt;b&gt;all&lt;/b&gt; the threads that are blocked in a &lt;code class="inline"&gt;&lt;span class="w"&gt;cond_wait&lt;/span&gt;&lt;/code&gt;  on the locked variable, rather than only one.&lt;/p&gt; &lt;/li&gt;&lt;/ul&gt; &lt;a name="OBJECTS"&gt;&lt;/a&gt;&lt;h1&gt;OBJECTS&lt;/h1&gt; &lt;p&gt;&lt;a href="http://perldoc.perl.org/threads/shared.html"&gt;threads::shared&lt;/a&gt; exports a version of &lt;a href="http://perldoc.perl.org/functions/bless.html"&gt;bless REF&lt;/a&gt; that works on shared objects such that &lt;i&gt;blessings&lt;/i&gt; propagate across threads.&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;span class="c"&gt;# Create a shared 'foo' object&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$foo&lt;/span&gt; = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/bless.html"&gt;bless&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="q"&gt;'foo'&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;span class="c"&gt;# Create a shared 'bar' object&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$bar&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$bar&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$bar&lt;/span&gt; = &lt;span class="i"&gt;&amp;amp;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;{&lt;/span&gt;&lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/bless.html"&gt;bless&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$bar&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="q"&gt;'bar'&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;span class="c"&gt;# Put 'bar' inside 'foo'&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;$foo&lt;/span&gt;-&gt;{&lt;span class="q"&gt;'bar'&lt;/span&gt;} = &lt;span class="i"&gt;$bar&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  # Rebless the objects via a thread&lt;br /&gt; threads-&gt;create(sub {&lt;br /&gt;     # Rebless the outer object&lt;br /&gt;     bless($foo, 'yin');&lt;/pre&gt;&lt;pre class="verbatim"&gt;      &lt;span class="c"&gt;# Cannot directly rebless the inner object&lt;/span&gt;&lt;br /&gt;     &lt;span class="c"&gt;#bless($foo-&gt;{'bar'}, 'yang');&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;      &lt;span class="c"&gt;# Retrieve and rebless the inner object&lt;/span&gt;&lt;br /&gt;     &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$obj&lt;/span&gt; = &lt;span class="i"&gt;$foo&lt;/span&gt;-&gt;{&lt;span class="q"&gt;'bar'&lt;/span&gt;}&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;a class="l_k" href="http://perldoc.perl.org/functions/bless.html"&gt;bless&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$obj&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="q"&gt;'yang'&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt;     &lt;span class="i"&gt;$foo&lt;/span&gt;-&gt;{&lt;span class="q"&gt;'bar'&lt;/span&gt;} = &lt;span class="i"&gt;$obj&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  })-&gt;join();&lt;/pre&gt;&lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/ref.html"&gt;ref&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt;          &lt;span class="q"&gt;"\n"&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;    &lt;span class="c"&gt;# Prints 'yin'&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/ref.html"&gt;ref&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;-&gt;{&lt;span class="q"&gt;'bar'&lt;/span&gt;}&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="q"&gt;"\n"&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;    &lt;span class="c"&gt;# Prints 'yang'&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/ref.html"&gt;ref&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$bar&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt;          &lt;span class="q"&gt;"\n"&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;    &lt;span class="c"&gt;# Also prints 'yang'&lt;/span&gt;&lt;/pre&gt; &lt;a name="NOTES"&gt;&lt;/a&gt;&lt;h1&gt;NOTES&lt;/h1&gt; &lt;p&gt;threads::shared is designed to disable itself silently if threads are not available. If you want access to threads, you must &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/use.html"&gt;use&lt;/a&gt; &lt;span class="w"&gt;threads&lt;/span&gt;&lt;/code&gt;  before you &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/use.html"&gt;use&lt;/a&gt; &lt;span class="w"&gt;threads::shared&lt;/span&gt;&lt;/code&gt; .  &lt;a href="http://perldoc.perl.org/threads.html"&gt;threads&lt;/a&gt; will emit a warning if you use it after &lt;a href="http://perldoc.perl.org/threads/shared.html"&gt;threads::shared&lt;/a&gt;.&lt;/p&gt; &lt;a name="BUGS-AND-LIMITATIONS"&gt;&lt;/a&gt;&lt;h1&gt;BUGS AND LIMITATIONS&lt;/h1&gt; &lt;p&gt;When &lt;code class="inline"&gt;&lt;span class="w"&gt;share&lt;/span&gt;&lt;/code&gt;  is used on arrays, hashes, array refs or hash refs, any data they contain will be lost.&lt;/p&gt; &lt;pre class="verbatim"&gt;  &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;@arr&lt;/span&gt; = &lt;span class="q"&gt;qw(foo bar baz)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;@arr&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span class="c"&gt;# @arr is now empty (i.e., == ());&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;span class="c"&gt;# Create a 'foo' object&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; &lt;span class="i"&gt;$foo&lt;/span&gt; = &lt;span class="s"&gt;{&lt;/span&gt; &lt;span class="q"&gt;'data'&lt;/span&gt; &lt;span class="cm"&gt;=&gt;&lt;/span&gt; &lt;span class="n"&gt;99&lt;/span&gt; &lt;span class="s"&gt;}&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/bless.html"&gt;bless&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="cm"&gt;,&lt;/span&gt; &lt;span class="q"&gt;'foo'&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;pre class="verbatim"&gt;  &lt;span class="c"&gt;# Share the object&lt;/span&gt;&lt;br /&gt; &lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;        &lt;span class="c"&gt;# Contents are now wiped out&lt;/span&gt;&lt;br /&gt; &lt;a class="l_k" href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="q"&gt;"ERROR: \$foo is empty\n"&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;br /&gt;     if &lt;span class="s"&gt;(&lt;/span&gt;! &lt;a class="l_k" href="http://perldoc.perl.org/functions/exists.html"&gt;exists&lt;/a&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$foo&lt;/span&gt;-&gt;{&lt;span class="q"&gt;'data'&lt;/span&gt;}&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sc"&gt;;&lt;/span&gt;&lt;/pre&gt; &lt;p&gt;Therefore, populate such variables &lt;b&gt;after&lt;/b&gt; declaring them as shared.  (Scalar and scalar refs are not affected by this problem.)&lt;/p&gt; &lt;p&gt;It is often not wise to share an object unless the class itself has been written to support sharing.  For example, an object's destructor may get called multiple times, once for each thread's scope exit.  Another danger is that the contents of hash-based objects will be lost due to the above mentioned limitation.  See &lt;i&gt;examples/class.pl&lt;/i&gt; (in the CPAN distribution of this module) for how to create a class that supports object sharing.&lt;/p&gt; &lt;p&gt;Does not support &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/splice.html"&gt;splice&lt;/a&gt;&lt;/code&gt; on arrays!&lt;/p&gt; &lt;p&gt;Taking references to the elements of shared arrays and hashes does not autovivify the elements, and neither does slicing a shared array/hash over non-existent indices/keys autovivify the elements.&lt;/p&gt; &lt;p&gt;&lt;code class="inline"&gt;&lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt;  allows you to &lt;code class="inline"&gt;&lt;span class="i"&gt;share&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="i"&gt;$hashref&lt;/span&gt;-&gt;{&lt;span class="w"&gt;key&lt;/span&gt;}&lt;span class="s"&gt;)&lt;/span&gt;&lt;/code&gt;  without giving any error message.  But the &lt;code class="inline"&gt;&lt;span class="i"&gt;$hashref&lt;/span&gt;-&gt;{&lt;span class="w"&gt;key&lt;/span&gt;}&lt;/code&gt;  is &lt;b&gt;not&lt;/b&gt; shared, causing the error "locking can only be used on shared values" to occur when you attempt to &lt;code class="inline"&gt;&lt;a class="l_k" href="http://perldoc.perl.org/functions/lock.html"&gt;lock($hasref-&gt;{key})&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;View existing bug reports at, and submit any new bugs, problems, patches, etc. to: &lt;a href="http://rt.cpan.org/NoAuth/Bugs.html?Dist=threads-shared"&gt;http://rt.cpan.org/NoAuth/Bugs.html?Dist=threads-shared&lt;/a&gt;&lt;/p&gt; &lt;a name="SEE-ALSO"&gt;&lt;/a&gt;&lt;h1&gt;SEE ALSO&lt;/h1&gt; &lt;p&gt;&lt;a href="http://perldoc.perl.org/threads/shared.html"&gt;threads::shared&lt;/a&gt; Discussion Forum on CPAN: &lt;a href="http://www.cpanforum.com/dist/threads-shared"&gt;http://www.cpanforum.com/dist/threads-shared&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Annotated POD for &lt;a href="http://perldoc.perl.org/threads/shared.html"&gt;threads::shared&lt;/a&gt;: &lt;a href="http://annocpan.org/%7EJDHEDDEN/threads-shared-1.14/shared.pm"&gt;http://annocpan.org/~JDHEDDEN/threads-shared-1.14/shared.pm&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Source repository: &lt;a href="http://code.google.com/p/threads-shared/"&gt;http://code.google.com/p/threads-shared/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://perldoc.perl.org/threads.html"&gt;threads&lt;/a&gt;, &lt;a href="http://perldoc.perl.org/perlthrtut.html"&gt;perlthrtut&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.perl.com/pub/a/2002/06/11/threads.html"&gt;http://www.perl.com/pub/a/2002/06/11/threads.html&lt;/a&gt; and &lt;a href="http://www.perl.com/pub/a/2002/09/04/threads.html"&gt;http://www.perl.com/pub/a/2002/09/04/threads.html&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Perl threads mailing list: &lt;a href="http://lists.cpan.org/showlist.cgi?name=iThreads"&gt;http://lists.cpan.org/showlist.cgi?name=iThreads&lt;/a&gt;&lt;/p&gt; &lt;a name="AUTHOR"&gt;&lt;/a&gt;&lt;h1&gt;AUTHOR&lt;/h1&gt; &lt;p&gt;Artur Bergman &lt;sky&gt;&lt;/p&gt; &lt;p&gt;threads::shared is released under the same license as Perl.&lt;/p&gt; &lt;p&gt;Documentation borrowed from the old Thread.pm.&lt;/p&gt; &lt;p&gt;CPAN version produced by Jerry D. Hedden &lt;jdhedden&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-2916785623693763962?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=u0d_6lQ17ng:JLRsxhi4LSQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=u0d_6lQ17ng:JLRsxhi4LSQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=u0d_6lQ17ng:JLRsxhi4LSQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/u0d_6lQ17ng" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-05-08T12:48:28.075+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/05/access-parents-variables-from-child.html</feedburner:origLink></item><item><title>This brief tutorial will outline how to enable file sharing in Ubuntu.</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/XAjrFAbU8UU/this-brief-tutorial-will-outline-how-to.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Mon, 21 Apr 2008 02:35:45 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-3032842978402054729</guid><description>&lt;p&gt; &lt;span id="more-256"&gt;&lt;/span&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt; Sharing files and folders across your network from your Ubuntu PC is every bit as easy as sharing files in Windows (arguably, it’s easier). Start by right-clicking the folder you want to share, and select &lt;strong&gt;Share Folder&lt;/strong&gt;. If the services required to share files/folders aren’t installed, you’ll be prompted to install them. &lt;/li&gt;&lt;p&gt;&lt;img src="http://www.simplehelp.net/images/sharedubuntu/fileshare01a.jpg" border="0" /&gt;&lt;/p&gt;&lt;li&gt; After clicking &lt;strong&gt;Install services&lt;/strong&gt; they will automatically start to download and install. &lt;/li&gt;&lt;p&gt;&lt;img src="http://www.simplehelp.net/images/sharedubuntu/fileshare02a.jpg" border="0" /&gt;&lt;/p&gt;&lt;li&gt; Once that has completed you’ll be presented with an options window. From here you can select the type of sharing (SMB or NFS), give the shared folder a name and decide if you want read-only access to the folder. Click &lt;strong&gt;OK&lt;/strong&gt; when you’re done.&lt;/li&gt;&lt;p&gt;&lt;img src="http://www.simplehelp.net/images/sharedubuntu/fileshare03.png" border="0" /&gt;&lt;/p&gt;&lt;li&gt; If you right-click on your newly shared folder and select &lt;strong&gt;Properties&lt;/strong&gt; and then the &lt;strong&gt;Emblems&lt;/strong&gt; tab, you can give the folder a unique icon so you’ll know it’s shared.  &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/sharedubuntu/fileshare04.png" rel="lightbox"&gt;&lt;img src="http://www.simplehelp.net/images/sharedubuntu/fileshare04a.jpg" border="0" /&gt;&lt;br /&gt;click to enlarge&lt;/a&gt;&lt;/p&gt;&lt;li&gt; You can further modify the permissions of your shared folder by selecting the &lt;strong&gt;Permissions&lt;/strong&gt; tab. &lt;/li&gt;&lt;p&gt;&lt;a href="http://www.simplehelp.net/images/sharedubuntu/fileshare08.png" rel="lightbox"&gt;&lt;img src="http://www.simplehelp.net/images/sharedubuntu/fileshare08a.jpg" border="0" /&gt;&lt;br /&gt;click to enlarge&lt;/a&gt;&lt;/p&gt;&lt;li&gt; Now open a terminal in Ubuntu and enter the command:&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt; sudo smbpasswd -a username &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This will add a SMB user.  &lt;/p&gt;&lt;/li&gt;&lt;li&gt; And now other computers can connect to your shared folder!  &lt;/li&gt;&lt;p&gt;&lt;img src="http://www.simplehelp.net/images/sharedubuntu/fileshare05a.jpg" border="0" /&gt; &lt;/p&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-3032842978402054729?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=XAjrFAbU8UU:QXOj0456bVY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=XAjrFAbU8UU:QXOj0456bVY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=XAjrFAbU8UU:QXOj0456bVY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/XAjrFAbU8UU" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-21T15:05:45.404+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/04/this-brief-tutorial-will-outline-how-to.html</feedburner:origLink></item><item><title>Split</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/_IyP0PUOMmY/split.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Thu, 17 Apr 2008 21:46:45 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-3335163882535485572</guid><description>&lt;h1&gt;&lt;br /&gt;&lt;/h1&gt; &lt;hr /&gt;  &lt;p&gt;  A very useful function in Perl is &lt;strong&gt;split&lt;/strong&gt;, which splits up a string and places it into an array. The function uses a regular expression and as usual works on the &lt;strong&gt;$_&lt;/strong&gt; variable unless otherwise specified.  &lt;/p&gt;&lt;p&gt;  The &lt;strong&gt;split&lt;/strong&gt; function is used like this: &lt;/p&gt;&lt;pre&gt;$info = "Caine:Michael:Actor:14, Leafy Drive";&lt;br /&gt;@personal = split(/:/, $info);&lt;br /&gt;&lt;/pre&gt; which has the same overall effect as &lt;pre&gt;@personal = ("Caine", "Michael", "Actor", "14, Leafy Drive");&lt;br /&gt;&lt;/pre&gt; If we have the information stored in the &lt;strong&gt;$_&lt;/strong&gt; variable then we can just use this instead &lt;pre&gt;@personal = split(/:/);&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;  If the fields are divided by any number of colons then we can use the RE codes to get round this. The code &lt;/p&gt;&lt;pre&gt;$_ = "Capes:Geoff::Shot putter:::Big Avenue";&lt;br /&gt;@personal = split(/:+/);&lt;br /&gt;&lt;/pre&gt; is the same as &lt;pre&gt;@personal = ("Capes", "Geoff",&lt;br /&gt;            "Shot putter", "Big Avenue");&lt;br /&gt;&lt;/pre&gt; But this: &lt;pre&gt;$_ = "Capes:Geoff::Shot putter:::Big Avenue";&lt;br /&gt;@personal = split(/:/);&lt;br /&gt;&lt;/pre&gt; would be like &lt;pre&gt;@personal = ("Capes", "Geoff", "",&lt;br /&gt;            "Shot putter", "", "", "Big Avenue");&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;  A word can be split into characters, a sentence split into words and a paragraph split into sentences: &lt;/p&gt;&lt;pre&gt;@chars = split(//, $word);&lt;br /&gt;@words = split(/ /, $sentence);&lt;br /&gt;@sentences = split(/\./, $paragraph);&lt;br /&gt;&lt;/pre&gt; In the first case the null string is matched between each character, and that is why the @chars array is an array of characters - ie an array of strings of length 1.&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-3335163882535485572?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=_IyP0PUOMmY:uBT7b-4S6co:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=_IyP0PUOMmY:uBT7b-4S6co:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=_IyP0PUOMmY:uBT7b-4S6co:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/_IyP0PUOMmY" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-18T10:16:45.319+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/04/split.html</feedburner:origLink></item><item><title>Perl Functions A-Z</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/aWTiWRyhCr4/perl-functions-z.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Tue, 08 Apr 2008 09:40:54 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-3576007988396126083</guid><description>&lt;h2&gt;A&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/abs.html"&gt;abs&lt;/a&gt; - absolute value function&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/accept.html"&gt;accept&lt;/a&gt; - accept an incoming socket connect&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/alarm.html"&gt;alarm&lt;/a&gt; - schedule a SIGALRM &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/atan2.html"&gt;atan2&lt;/a&gt; - arctangent of Y/X in the range -PI to PI&lt;/li&gt;&lt;/ul&gt;&lt;a name="B"&gt;&lt;/a&gt;&lt;h2&gt;B&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/bind.html"&gt;bind&lt;/a&gt; - binds an address to a socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/binmode.html"&gt;binmode&lt;/a&gt; - prepare binary files for I/O&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/bless.html"&gt;bless&lt;/a&gt; - create an object &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/break.html"&gt;break&lt;/a&gt; - &lt;/li&gt;&lt;/ul&gt;&lt;a name="C"&gt;&lt;/a&gt;&lt;h2&gt;C&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/caller.html"&gt;caller&lt;/a&gt; - get context of the current subroutine call&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chdir.html"&gt;chdir&lt;/a&gt; - change your current working directory&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chmod.html"&gt;chmod&lt;/a&gt; - changes the permissions on a list of files&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chomp.html"&gt;chomp&lt;/a&gt; - remove a trailing record separator from a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chop.html"&gt;chop&lt;/a&gt; - remove the last character from a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chown.html"&gt;chown&lt;/a&gt; - change the owership on a list of files&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chr.html"&gt;chr&lt;/a&gt; - get character this number represents&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/chroot.html"&gt;chroot&lt;/a&gt; - make directory new root for path lookups&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/close.html"&gt;close&lt;/a&gt; - close file (or pipe or socket) handle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/closedir.html"&gt;closedir&lt;/a&gt; - close directory handle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/connect.html"&gt;connect&lt;/a&gt; - connect to a remote socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/continue.html"&gt;continue&lt;/a&gt; - optional trailing block in a while or foreach &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/cos.html"&gt;cos&lt;/a&gt; - cosine function&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/crypt.html"&gt;crypt&lt;/a&gt; - one-way passwd-style encryption&lt;/li&gt;&lt;/ul&gt;&lt;a name="D"&gt;&lt;/a&gt;&lt;h2&gt;D&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/dbmclose.html"&gt;dbmclose&lt;/a&gt; - breaks binding on a tied dbm file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/dbmopen.html"&gt;dbmopen&lt;/a&gt; - create binding on a tied dbm file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/defined.html"&gt;defined&lt;/a&gt; - test whether a value, variable, or function is defined&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/delete.html"&gt;delete&lt;/a&gt; - deletes a value from a hash&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/die.html"&gt;die&lt;/a&gt; - raise an exception or bail out&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/do.html"&gt;do&lt;/a&gt; - turn a BLOCK into a TERM&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/dump.html"&gt;dump&lt;/a&gt; - create an immediate core dump&lt;/li&gt;&lt;/ul&gt;&lt;a name="E"&gt;&lt;/a&gt;&lt;h2&gt;E&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/each.html"&gt;each&lt;/a&gt; - retrieve the next key/value pair from a hash&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/endgrent.html"&gt;endgrent&lt;/a&gt; - be done using group file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/endhostent.html"&gt;endhostent&lt;/a&gt; - be done using hosts file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/endnetent.html"&gt;endnetent&lt;/a&gt; - be done using networks file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/endprotoent.html"&gt;endprotoent&lt;/a&gt; - be done using protocols file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/endpwent.html"&gt;endpwent&lt;/a&gt; - be done using passwd file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/endservent.html"&gt;endservent&lt;/a&gt; - be done using services file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/eof.html"&gt;eof&lt;/a&gt; - test a filehandle for its end&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/eval.html"&gt;eval&lt;/a&gt; - catch exceptions or compile and run code&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/exec.html"&gt;exec&lt;/a&gt; - abandon this program to run another&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/exists.html"&gt;exists&lt;/a&gt; - test whether a hash key is present&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/exit.html"&gt;exit&lt;/a&gt; - terminate this program&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/exp.html"&gt;exp&lt;/a&gt; - raise I&lt;e&gt; to a power&lt;/e&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a name="F"&gt;&lt;/a&gt;&lt;h2&gt;F&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/fcntl.html"&gt;fcntl&lt;/a&gt; - file control system call&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/fileno.html"&gt;fileno&lt;/a&gt; - return file descriptor from filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/flock.html"&gt;flock&lt;/a&gt; - lock an entire file with an advisory lock&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/fork.html"&gt;fork&lt;/a&gt; - create a new process just like this one&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/format.html"&gt;format&lt;/a&gt; - declare a picture format with use by the write() function&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/formline.html"&gt;formline&lt;/a&gt; - internal function used for formats&lt;/li&gt;&lt;/ul&gt;&lt;a name="G"&gt;&lt;/a&gt;&lt;h2&gt;G&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getc.html"&gt;getc&lt;/a&gt; - get the next character from the filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getgrent.html"&gt;getgrent&lt;/a&gt; - get next group record &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getgrgid.html"&gt;getgrgid&lt;/a&gt; - get group record given group user ID&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getgrnam.html"&gt;getgrnam&lt;/a&gt; - get group record given group name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/gethostbyaddr.html"&gt;gethostbyaddr&lt;/a&gt; - get host record given its address&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/gethostbyname.html"&gt;gethostbyname&lt;/a&gt; - get host record given name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/gethostent.html"&gt;gethostent&lt;/a&gt; - get next hosts record &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getlogin.html"&gt;getlogin&lt;/a&gt; - return who logged in at this tty&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getnetbyaddr.html"&gt;getnetbyaddr&lt;/a&gt; - get network record given its address&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getnetbyname.html"&gt;getnetbyname&lt;/a&gt; - get networks record given name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getnetent.html"&gt;getnetent&lt;/a&gt; - get next networks record &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getpeername.html"&gt;getpeername&lt;/a&gt; - find the other end of a socket connection&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getpgrp.html"&gt;getpgrp&lt;/a&gt; - get process group&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getppid.html"&gt;getppid&lt;/a&gt; - get parent process ID&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getpriority.html"&gt;getpriority&lt;/a&gt; - get current nice value&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getprotobyname.html"&gt;getprotobyname&lt;/a&gt; - get protocol record given name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getprotobynumber.html"&gt;getprotobynumber&lt;/a&gt; - get protocol record numeric protocol&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getprotoent.html"&gt;getprotoent&lt;/a&gt; - get next protocols record&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getpwent.html"&gt;getpwent&lt;/a&gt; - get next passwd record&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getpwnam.html"&gt;getpwnam&lt;/a&gt; - get passwd record given user login name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getpwuid.html"&gt;getpwuid&lt;/a&gt; - get passwd record given user ID&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getservbyname.html"&gt;getservbyname&lt;/a&gt; - get services record given its name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getservbyport.html"&gt;getservbyport&lt;/a&gt; - get services record given numeric port&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getservent.html"&gt;getservent&lt;/a&gt; - get next services record &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getsockname.html"&gt;getsockname&lt;/a&gt; - retrieve the sockaddr for a given socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/getsockopt.html"&gt;getsockopt&lt;/a&gt; - get socket options on a given socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/glob.html"&gt;glob&lt;/a&gt; - expand filenames using wildcards&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/gmtime.html"&gt;gmtime&lt;/a&gt; - convert UNIX time into record or string using Greenwich time&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/goto.html"&gt;goto&lt;/a&gt; - create spaghetti code&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/grep.html"&gt;grep&lt;/a&gt; - locate elements in a list test true against a given criterion&lt;/li&gt;&lt;/ul&gt;&lt;a name="H"&gt;&lt;/a&gt;&lt;h2&gt;H&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/hex.html"&gt;hex&lt;/a&gt; - convert a string to a hexadecimal number&lt;/li&gt;&lt;/ul&gt;&lt;a name="I"&gt;&lt;/a&gt;&lt;h2&gt;I&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/import.html"&gt;import&lt;/a&gt; - patch a module's namespace into your own&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/index.html"&gt;index&lt;/a&gt; - find a substring within a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/int.html"&gt;int&lt;/a&gt; - get the integer portion of a number&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/ioctl.html"&gt;ioctl&lt;/a&gt; - system-dependent device control system call&lt;/li&gt;&lt;/ul&gt;&lt;a name="J"&gt;&lt;/a&gt;&lt;h2&gt;J&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/join.html"&gt;join&lt;/a&gt; - join a list into a string using a separator&lt;/li&gt;&lt;/ul&gt;&lt;a name="K"&gt;&lt;/a&gt;&lt;h2&gt;K&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/keys.html"&gt;keys&lt;/a&gt; - retrieve list of indices from a hash&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/kill.html"&gt;kill&lt;/a&gt; - send a signal to a process or process group&lt;/li&gt;&lt;/ul&gt;&lt;a name="L"&gt;&lt;/a&gt;&lt;h2&gt;L&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/last.html"&gt;last&lt;/a&gt; - exit a block prematurely&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/lc.html"&gt;lc&lt;/a&gt; - return lower-case version of a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/lcfirst.html"&gt;lcfirst&lt;/a&gt; - return a string with just the next letter in lower case&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/length.html"&gt;length&lt;/a&gt; - return the number of bytes in a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/link.html"&gt;link&lt;/a&gt; - create a hard link in the filesytem&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/listen.html"&gt;listen&lt;/a&gt; - register your socket as a server &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/local.html"&gt;local&lt;/a&gt; - create a temporary value for a global variable (dynamic scoping)&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/localtime.html"&gt;localtime&lt;/a&gt; - convert UNIX time into record or string using local time&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/lock.html"&gt;lock&lt;/a&gt; - get a thread lock on a variable, subroutine, or method&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/log.html"&gt;log&lt;/a&gt; - retrieve the natural logarithm for a number&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/lstat.html"&gt;lstat&lt;/a&gt; - stat a symbolic link&lt;/li&gt;&lt;/ul&gt;&lt;a name="M"&gt;&lt;/a&gt;&lt;h2&gt;M&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/m.html"&gt;m&lt;/a&gt; - match a string with a regular expression pattern&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/map.html"&gt;map&lt;/a&gt; - apply a change to a list to get back a new list with the changes&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/mkdir.html"&gt;mkdir&lt;/a&gt; - create a directory&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/msgctl.html"&gt;msgctl&lt;/a&gt; - SysV IPC message control operations&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/msgget.html"&gt;msgget&lt;/a&gt; - get SysV IPC message queue&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/msgrcv.html"&gt;msgrcv&lt;/a&gt; - receive a SysV IPC message from a message queue&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/msgsnd.html"&gt;msgsnd&lt;/a&gt; - send a SysV IPC message to a message queue&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/my.html"&gt;my&lt;/a&gt; - declare and assign a local variable (lexical scoping)&lt;/li&gt;&lt;/ul&gt;&lt;a name="N"&gt;&lt;/a&gt;&lt;h2&gt;N&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/next.html"&gt;next&lt;/a&gt; - iterate a block prematurely&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/no.html"&gt;no&lt;/a&gt; - unimport some module symbols or semantics at compile time&lt;/li&gt;&lt;/ul&gt;&lt;a name="O"&gt;&lt;/a&gt;&lt;h2&gt;O&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/oct.html"&gt;oct&lt;/a&gt; - convert a string to an octal number&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/open.html"&gt;open&lt;/a&gt; - open a file, pipe, or descriptor&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/opendir.html"&gt;opendir&lt;/a&gt; - open a directory&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/ord.html"&gt;ord&lt;/a&gt; - find a character's numeric representation&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/our.html"&gt;our&lt;/a&gt; - declare and assign a package variable (lexical scoping)&lt;/li&gt;&lt;/ul&gt;&lt;a name="P"&gt;&lt;/a&gt;&lt;h2&gt;P&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/pack.html"&gt;pack&lt;/a&gt; - convert a list into a binary representation&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/package.html"&gt;package&lt;/a&gt; - declare a separate global namespace&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/pipe.html"&gt;pipe&lt;/a&gt; - open a pair of connected filehandles&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/pop.html"&gt;pop&lt;/a&gt; - remove the last element from an array and return it&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/pos.html"&gt;pos&lt;/a&gt; - find or set the offset for the last/next m//g search&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/print.html"&gt;print&lt;/a&gt; - output a list to a filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/printf.html"&gt;printf&lt;/a&gt; - output a formatted list to a filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/prototype.html"&gt;prototype&lt;/a&gt; - get the prototype (if any) of a subroutine&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/push.html"&gt;push&lt;/a&gt; - append one or more elements to an array&lt;/li&gt;&lt;/ul&gt;&lt;a name="Q"&gt;&lt;/a&gt;&lt;h2&gt;Q&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/q.html"&gt;q&lt;/a&gt; - singly quote a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/qq.html"&gt;qq&lt;/a&gt; - doubly quote a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/qr.html"&gt;qr&lt;/a&gt; - Compile pattern &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/quotemeta.html"&gt;quotemeta&lt;/a&gt; - quote regular expression magic characters&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/qw.html"&gt;qw&lt;/a&gt; - quote a list of words&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/qx.html"&gt;qx&lt;/a&gt; - backquote quote a string&lt;/li&gt;&lt;/ul&gt;&lt;a name="R"&gt;&lt;/a&gt;&lt;h2&gt;R&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/rand.html"&gt;rand&lt;/a&gt; - retrieve the next pseudorandom number &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/read.html"&gt;read&lt;/a&gt; - fixed-length buffered input from a filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/readdir.html"&gt;readdir&lt;/a&gt; - get a directory from a directory handle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/readline.html"&gt;readline&lt;/a&gt; - fetch a record from a file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/readlink.html"&gt;readlink&lt;/a&gt; - determine where a symbolic link is pointing&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/readpipe.html"&gt;readpipe&lt;/a&gt; - execute a system command and collect standard output&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/recv.html"&gt;recv&lt;/a&gt; - receive a message over a Socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/redo.html"&gt;redo&lt;/a&gt; - start this loop iteration over again&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/ref.html"&gt;ref&lt;/a&gt; - find out the type of thing being referenced&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/rename.html"&gt;rename&lt;/a&gt; - change a filename&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/require.html"&gt;require&lt;/a&gt; - load in external functions from a library at runtime&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/reset.html"&gt;reset&lt;/a&gt; - clear all variables of a given name&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/return.html"&gt;return&lt;/a&gt; - get out of a function early&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/reverse.html"&gt;reverse&lt;/a&gt; - flip a string or a list&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/rewinddir.html"&gt;rewinddir&lt;/a&gt; - reset directory handle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/rindex.html"&gt;rindex&lt;/a&gt; - right-to-left substring search&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/rmdir.html"&gt;rmdir&lt;/a&gt; - remove a directory&lt;/li&gt;&lt;/ul&gt;&lt;a name="S"&gt;&lt;/a&gt;&lt;h2&gt;S&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/s.html"&gt;s&lt;/a&gt; - replace a pattern with a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/say.html"&gt;say&lt;/a&gt; - &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/scalar.html"&gt;scalar&lt;/a&gt; - force a scalar context&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/seek.html"&gt;seek&lt;/a&gt; - reposition file pointer for random-access I/O&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/seekdir.html"&gt;seekdir&lt;/a&gt; - reposition directory pointer &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/select.html"&gt;select&lt;/a&gt; - reset default output or do I/O multiplexing&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/semctl.html"&gt;semctl&lt;/a&gt; - SysV semaphore control operations&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/semget.html"&gt;semget&lt;/a&gt; - get set of SysV semaphores&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/semop.html"&gt;semop&lt;/a&gt; - SysV semaphore operations&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/send.html"&gt;send&lt;/a&gt; - send a message over a socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setgrent.html"&gt;setgrent&lt;/a&gt; - prepare group file for use&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sethostent.html"&gt;sethostent&lt;/a&gt; - prepare hosts file for use&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setnetent.html"&gt;setnetent&lt;/a&gt; - prepare networks file for use&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setpgrp.html"&gt;setpgrp&lt;/a&gt; - set the process group of a process&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setpriority.html"&gt;setpriority&lt;/a&gt; - set a process's nice value&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setprotoent.html"&gt;setprotoent&lt;/a&gt; - prepare protocols file for use&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setpwent.html"&gt;setpwent&lt;/a&gt; - prepare passwd file for use&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setservent.html"&gt;setservent&lt;/a&gt; - prepare services file for use&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/setsockopt.html"&gt;setsockopt&lt;/a&gt; - set some socket options&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/shift.html"&gt;shift&lt;/a&gt; - remove the first element of an array, and return it&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/shmctl.html"&gt;shmctl&lt;/a&gt; - SysV shared memory operations&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/shmget.html"&gt;shmget&lt;/a&gt; - get SysV shared memory segment identifier&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/shmread.html"&gt;shmread&lt;/a&gt; - read SysV shared memory &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/shmwrite.html"&gt;shmwrite&lt;/a&gt; - write SysV shared memory &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/shutdown.html"&gt;shutdown&lt;/a&gt; - close down just half of a socket connection&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sin.html"&gt;sin&lt;/a&gt; - return the sine of a number&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sleep.html"&gt;sleep&lt;/a&gt; - block for some number of seconds&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/socket.html"&gt;socket&lt;/a&gt; - create a socket&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/socketpair.html"&gt;socketpair&lt;/a&gt; - create a pair of sockets&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sort.html"&gt;sort&lt;/a&gt; - sort a list of values &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/splice.html"&gt;splice&lt;/a&gt; - add or remove elements anywhere in an array&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/split.html"&gt;split&lt;/a&gt; - split up a string using a regexp delimiter&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sprintf.html"&gt;sprintf&lt;/a&gt; - formatted print into a string &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sqrt.html"&gt;sqrt&lt;/a&gt; - square root function&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/srand.html"&gt;srand&lt;/a&gt; - seed the random number generator&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/stat.html"&gt;stat&lt;/a&gt; - get a file's status information&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/state.html"&gt;state&lt;/a&gt; - &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/study.html"&gt;study&lt;/a&gt; - optimize input data for repeated searches&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sub.html"&gt;sub&lt;/a&gt; - declare a subroutine, possibly anonymously&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/substr.html"&gt;substr&lt;/a&gt; - get or alter a portion of a stirng&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/symlink.html"&gt;symlink&lt;/a&gt; - create a symbolic link to a file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/syscall.html"&gt;syscall&lt;/a&gt; - execute an arbitrary system call&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sysopen.html"&gt;sysopen&lt;/a&gt; - open a file, pipe, or descriptor&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sysread.html"&gt;sysread&lt;/a&gt; - fixed-length unbuffered input from a filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/sysseek.html"&gt;sysseek&lt;/a&gt; - position I/O pointer on handle used with sysread and syswrite&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/system.html"&gt;system&lt;/a&gt; - run a separate program &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/syswrite.html"&gt;syswrite&lt;/a&gt; - fixed-length unbuffered output to a filehandle&lt;/li&gt;&lt;/ul&gt;&lt;a name="T"&gt;&lt;/a&gt;&lt;h2&gt;T&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/tell.html"&gt;tell&lt;/a&gt; - get current seekpointer on a filehandle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/telldir.html"&gt;telldir&lt;/a&gt; - get current seekpointer on a directory handle&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/tie.html"&gt;tie&lt;/a&gt; - bind a variable to an object class &lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/tied.html"&gt;tied&lt;/a&gt; - get a reference to the object underlying a tied variable&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/time.html"&gt;time&lt;/a&gt; - return number of seconds since 1970&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/times.html"&gt;times&lt;/a&gt; - return elapsed time for self and child processes&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/tr.html"&gt;tr&lt;/a&gt; - transliterate a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/truncate.html"&gt;truncate&lt;/a&gt; - shorten a file&lt;/li&gt;&lt;/ul&gt;&lt;a name="U"&gt;&lt;/a&gt;&lt;h2&gt;U&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/uc.html"&gt;uc&lt;/a&gt; - return upper-case version of a string&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/ucfirst.html"&gt;ucfirst&lt;/a&gt; - return a string with just the next letter in upper case&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/umask.html"&gt;umask&lt;/a&gt; - set file creation mode mask&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/undef.html"&gt;undef&lt;/a&gt; - remove a variable or function definition&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/unlink.html"&gt;unlink&lt;/a&gt; - remove one link to a file&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/unpack.html"&gt;unpack&lt;/a&gt; - convert binary structure into normal perl variables&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/unshift.html"&gt;unshift&lt;/a&gt; - prepend more elements to the beginning of a list&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/untie.html"&gt;untie&lt;/a&gt; - break a tie binding to a variable&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/use.html"&gt;use&lt;/a&gt; - load in a module at compile time&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/utime.html"&gt;utime&lt;/a&gt; - set a file's last access and modify times&lt;/li&gt;&lt;/ul&gt;&lt;a name="V"&gt;&lt;/a&gt;&lt;h2&gt;V&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/values.html"&gt;values&lt;/a&gt; - return a list of the values in a hash&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/vec.html"&gt;vec&lt;/a&gt; - test or set particular bits in a string&lt;/li&gt;&lt;/ul&gt;&lt;a name="W"&gt;&lt;/a&gt;&lt;h2&gt;W&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/wait.html"&gt;wait&lt;/a&gt; - wait for any child process to die&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/waitpid.html"&gt;waitpid&lt;/a&gt; - wait for  a particular child process to die&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/wantarray.html"&gt;wantarray&lt;/a&gt; - get void vs scalar vs list context of current subroutine call&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/warn.html"&gt;warn&lt;/a&gt; - print debugging info&lt;/li&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/write.html"&gt;write&lt;/a&gt; - print a picture record&lt;/li&gt;&lt;/ul&gt;&lt;a name="X"&gt;&lt;/a&gt;&lt;h2&gt;X&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/-X.html"&gt;-X&lt;/a&gt; - a file test (-r, -x, etc)&lt;/li&gt;&lt;/ul&gt;&lt;a name="Y"&gt;&lt;/a&gt;&lt;h2&gt;Y&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://perldoc.perl.org/functions/y.html"&gt;y&lt;/a&gt; - transliterate a string&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-3576007988396126083?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=aWTiWRyhCr4:EniS4p8CxKk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=aWTiWRyhCr4:EniS4p8CxKk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=aWTiWRyhCr4:EniS4p8CxKk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/aWTiWRyhCr4" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-08T22:10:54.308+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/04/perl-functions-z.html</feedburner:origLink></item><item><title>tutorial on threads in Perl</title><link>http://feedproxy.google.com/~r/Bugz-burnerTech-pump/~3/5EU1Z5RPvOw/tutorial-on-threads-in-perl.html</link><author>noreply@blogger.com (Heshan Wanigasooriya)</author><pubDate>Tue, 08 Apr 2008 01:10:32 PDT</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7615580403874889653.post-176131659886792709</guid><description>&lt;h1&gt;&lt;a name="name"&gt;NAME&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;perlthrtut - tutorial on threads in Perl&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="description"&gt;DESCRIPTION&lt;/a&gt;&lt;/h1&gt; &lt;pre&gt;    WARNING: Threading is an experimental feature.  Both the interface&lt;br /&gt;   and implementation are subject to change drastically.  In fact, this&lt;br /&gt;   documentation describes the flavor of threads that was in version&lt;br /&gt;   5.005.  Perl 5.6.0 and later have the beginnings of support for&lt;br /&gt;   interpreter threads, which (when finished) is expected to be&lt;br /&gt;   significantly different from what is described here.  The information&lt;br /&gt;   contained here may therefore soon be obsolete.  Use at your own risk!&lt;/pre&gt; &lt;p&gt;One of the most prominent new features of Perl 5.005 is the inclusion of threads.  Threads make a number of things a lot easier, and are a very useful addition to your bag of programming tricks.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="what is a thread anyway"&gt;What Is A Thread Anyway?&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;A thread is a flow of control through a program with a single execution point.&lt;/p&gt; &lt;p&gt;Sounds an awful lot like a process, doesn't it? Well, it should. Threads are one of the pieces of a process.  Every process has at least one thread and, up until now, every process running Perl had only one thread.  With 5.005, though, you can create extra threads.  We're going to show you how, when, and why.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="threaded program models"&gt;Threaded Program Models&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;There are three basic ways that you can structure a threaded program.  Which model you choose depends on what you need your program to do.  For many non-trivial threaded programs you'll need to choose different models for different pieces of your program.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="boss/worker"&gt;Boss/Worker&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The boss/worker model usually has one `boss' thread and one or more `worker' threads.  The boss thread gathers or generates tasks that need to be done, then parcels those tasks out to the appropriate worker thread.&lt;/p&gt; &lt;p&gt;This model is common in GUI and server programs, where a main thread waits for some event and then passes that event to the appropriate worker threads for processing.  Once the event has been passed on, the boss thread goes back to waiting for another event.&lt;/p&gt; &lt;p&gt;The boss thread does relatively little work.  While tasks aren't necessarily performed faster than with any other method, it tends to have the best user-response times.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="work crew"&gt;Work Crew&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;In the work crew model, several threads are created that do essentially the same thing to different pieces of data.  It closely mirrors classical parallel processing and vector processors, where a large array of processors do the exact same thing to many pieces of data.&lt;/p&gt; &lt;p&gt;This model is particularly useful if the system running the program will distribute multiple threads across different processors.  It can also be useful in ray tracing or rendering engines, where the individual threads can pass on interim results to give the user visual feedback.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="pipeline"&gt;Pipeline&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The pipeline model divides up a task into a series of steps, and passes the results of one step on to the thread processing the next.  Each thread does one thing to each piece of data and passes the results to the next thread in line.&lt;/p&gt; &lt;p&gt;This model makes the most sense if you have multiple processors so two or more threads will be executing in parallel, though it can often make sense in other contexts as well.  It tends to keep the individual tasks small and simple, as well as allowing some parts of the pipeline to block (on I/O or system calls, for example) while other parts keep going.  If you're running different parts of the pipeline on different processors you may also take advantage of the caches on each processor.&lt;/p&gt; &lt;p&gt;This model is also handy for a form of recursive programming where, rather than having a subroutine call itself, it instead creates another thread.  Prime and Fibonacci generators both map well to this form of the pipeline model. (A version of a prime number generator is presented later on.)&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="native threads"&gt;Native threads&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;There are several different ways to implement threads on a system.  How threads are implemented depends both on the vendor and, in some cases, the version of the operating system.  Often the first implementation will be relatively simple, but later versions of the OS will be more sophisticated.&lt;/p&gt; &lt;p&gt;While the information in this section is useful, it's not necessary, so you can skip it if you don't feel up to it.&lt;/p&gt; &lt;p&gt;There are three basic categories of threads-user-mode threads, kernel threads, and multiprocessor kernel threads.&lt;/p&gt; &lt;p&gt;User-mode threads are threads that live entirely within a program and its libraries.  In this model, the OS knows nothing about threads.  As far as it's concerned, your process is just a process.&lt;/p&gt; &lt;p&gt;This is the easiest way to implement threads, and the way most OSes start.  The big disadvantage is that, since the OS knows nothing about threads, if one thread blocks they all do.  Typical blocking activities include most system calls, most I/O, and things like sleep().&lt;/p&gt; &lt;p&gt;Kernel threads are the next step in thread evolution.  The OS knows about kernel threads, and makes allowances for them.  The main difference between a kernel thread and a user-mode thread is blocking.  With kernel threads, things that block a single thread don't block other threads.  This is not the case with user-mode threads, where the kernel blocks at the process level and not the thread level.&lt;/p&gt; &lt;p&gt;This is a big step forward, and can give a threaded program quite a performance boost over non-threaded programs.  Threads that block performing I/O, for example, won't block threads that are doing other things.  Each process still has only one thread running at once, though, regardless of how many CPUs a system might have.&lt;/p&gt; &lt;p&gt;Since kernel threading can interrupt a thread at any time, they will uncover some of the implicit locking assumptions you may make in your program.  For example, something as simple as &lt;code&gt;$a = $a + 2&lt;/code&gt; can behave unpredictably with kernel threads if $a is visible to other threads, as another thread may have changed $a between the time it was fetched on the right hand side and the time the new value is stored.&lt;/p&gt; &lt;p&gt;Multiprocessor Kernel Threads are the final step in thread support.  With multiprocessor kernel threads on a machine with multiple CPUs, the OS may schedule two or more threads to run simultaneously on different CPUs.&lt;/p&gt; &lt;p&gt;This can give a serious performance boost to your threaded program, since more than one thread will be executing at the same time.  As a tradeoff, though, any of those nagging synchronization issues that might not have shown with basic kernel threads will appear with a vengeance.&lt;/p&gt; &lt;p&gt;In addition to the different levels of OS involvement in threads, different OSes (and different thread implementations for a particular OS) allocate CPU cycles to threads in different ways.&lt;/p&gt; &lt;p&gt;Cooperative multitasking systems have running threads give up control if one of two things happen.  If a thread calls a yield function, it gives up control.  It also gives up control if the thread does something that would cause it to block, such as perform I/O.  In a cooperative multitasking implementation, one thread can starve all the others for CPU time if it so chooses.&lt;/p&gt; &lt;p&gt;Preemptive multitasking systems interrupt threads at regular intervals while the system decides which thread should run next.  In a preemptive multitasking system, one thread usually won't monopolize the CPU.&lt;/p&gt; &lt;p&gt;On some systems, there can be cooperative and preemptive threads running simultaneously. (Threads running with realtime priorities often behave cooperatively, for example, while threads running at normal priorities behave preemptively.)&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="what kind of threads are perl threads"&gt;What kind of threads are perl threads?&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;If you have experience with other thread implementations, you might find that things aren't quite what you expect.  It's very important to remember when dealing with Perl threads that Perl Threads Are Not X Threads, for all values of X.  They aren't POSIX threads, or DecThreads, or Java's Green threads, or Win32 threads.  There are similarities, and the broad concepts are the same, but if you start looking for implementation details you're going to be either disappointed or confused.  Possibly both.&lt;/p&gt; &lt;p&gt;This is not to say that Perl threads are completely different from everything that's ever come before--they're not.  Perl's threading model owes a lot to other thread models, especially POSIX.  Just as Perl is not C, though, Perl threads are not POSIX threads.  So if you find yourself looking for mutexes, or thread priorities, it's time to step back a bit and think about what you want to do and how Perl can do it.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="threadsafe modules"&gt;Threadsafe Modules&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;The addition of threads has changed Perl's internals substantially.  There are implications for people who write modules--especially modules with XS code or external libraries.  While most modules won't encounter any problems, modules that aren't explicitly tagged as thread-safe should be tested before being used in production code.&lt;/p&gt; &lt;p&gt;Not all modules that you might use are thread-safe, and you should always assume a module is unsafe unless the documentation says otherwise.  This includes modules that are distributed as part of the core.  Threads are a beta feature, and even some of the standard modules aren't thread-safe.&lt;/p&gt; &lt;p&gt;If you're using a module that's not thread-safe for some reason, you can protect yourself by using semaphores and lots of programming discipline to control access to the module.  Semaphores are covered later in the article.  Perl Threads Are Different&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="thread basics"&gt;Thread Basics&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;The core Thread module provides the basic functions you need to write threaded programs.  In the following sections we'll cover the basics, showing you what you need to do to create a threaded program.   After that, we'll go over some of the features of the Thread module that make threaded programming easier.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="basic thread support"&gt;Basic Thread Support&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Thread support is a Perl compile-time option-it's something that's turned on or off when Perl is built at your site, rather than when your programs are compiled. If your Perl wasn't compiled with thread support enabled, then any attempt to use threads will fail.&lt;/p&gt; &lt;p&gt;Remember that the threading support in 5.005 is in beta release, and should be treated as such.   You should expect that it may not function entirely properly, and the thread interface may well change some before it is a fully supported, production release.  The beta version shouldn't be used for mission-critical projects.  Having said that, threaded Perl is pretty nifty, and worth a look.&lt;/p&gt; &lt;p&gt;Your programs can use the Config module to check whether threads are enabled. If your program can't run without them, you can say something like:&lt;/p&gt; &lt;pre&gt;  $Config{usethreads} or die "Recompile Perl with threads to run this program.";&lt;/pre&gt; &lt;p&gt;A possibly-threaded program using a possibly-threaded module might have code like this:&lt;/p&gt; &lt;pre&gt;    use Config;&lt;br /&gt;   use MyMod;&lt;/pre&gt; &lt;pre&gt;    if ($Config{usethreads}) {&lt;br /&gt;       # We have threads&lt;br /&gt;       require MyMod_threaded;&lt;br /&gt;       import MyMod_threaded;&lt;br /&gt;   } else {&lt;br /&gt;       require MyMod_unthreaded;&lt;br /&gt;       import MyMod_unthreaded;&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;Since code that runs both with and without threads is usually pretty messy, it's best to isolate the thread-specific code in its own module.  In our example above, that's what MyMod_threaded is, and it's only imported if we're running on a threaded Perl.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="creating threads"&gt;Creating Threads&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The Thread package provides the tools you need to create new threads.  Like any other module, you need to tell Perl you want to use it; use Thread imports all the pieces you need to create basic threads.&lt;/p&gt; &lt;p&gt;The simplest, straightforward way to create a thread is with new():&lt;/p&gt; &lt;pre&gt;    use Thread;&lt;/pre&gt; &lt;pre&gt;    $thr = new Thread \&amp;sub1;&lt;/pre&gt; &lt;pre&gt;    sub sub1 {&lt;br /&gt;       print "In the thread\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;The &lt;code&gt;new()&lt;/code&gt; method takes a reference to a subroutine and creates a new thread, which starts executing in the referenced subroutine.  Control then passes both to the subroutine and the caller.&lt;/p&gt; &lt;p&gt;If you need to, your program can pass parameters to the subroutine as part of the thread startup.  Just include the list of parameters as part of the &lt;code&gt;Thread::new&lt;/code&gt; call, like this:&lt;/p&gt; &lt;pre&gt;    use Thread;&lt;br /&gt;   $Param3 = "foo";&lt;br /&gt;   $thr = new Thread \&amp;amp;sub1, "Param 1", "Param 2", $Param3;&lt;br /&gt;   $thr = new Thread \&amp;amp;sub1, @ParamList;&lt;br /&gt;   $thr = new Thread \&amp;amp;sub1, qw(Param1 Param2 $Param3);&lt;/pre&gt; &lt;pre&gt;    sub sub1 {&lt;br /&gt;       my @InboundParameters = @_;&lt;br /&gt;       print "In the thread\n";&lt;br /&gt;       print "got parameters &gt;", join("&lt;&gt;", @InboundParameters), "&lt;\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;The subroutine runs like a normal Perl subroutine, and the call to new Thread returns whatever the subroutine returns.&lt;/p&gt; &lt;p&gt;The last example illustrates another feature of threads.  You can spawn off several threads using the same subroutine.  Each thread executes the same subroutine, but in a separate thread with a separate environment and potentially separate arguments.&lt;/p&gt; &lt;p&gt;The other way to spawn a new thread is with async(), which is a way to spin off a chunk of code like eval(), but into its own thread:&lt;/p&gt; &lt;pre&gt;    use Thread qw(async);&lt;/pre&gt; &lt;pre&gt;    $LineCount = 0;&lt;/pre&gt; &lt;pre&gt;    $thr = async {&lt;br /&gt;       while(&lt;&gt;) {$LineCount++}        &lt;br /&gt;       print "Got $LineCount lines\n";&lt;br /&gt;   };&lt;/pre&gt; &lt;pre&gt;    print "Waiting for the linecount to end\n";&lt;br /&gt;   $thr-&gt;join;&lt;br /&gt;   print "All done\n";&lt;/pre&gt; &lt;p&gt;You'll notice we did a use Thread &lt;code&gt;qw(async)&lt;/code&gt; in that example.  async is not exported by default, so if you want it, you'll either need to import it before you use it or fully qualify it as Thread::async.  You'll also note that there's a semicolon after the closing brace.  That's because &lt;code&gt;async()&lt;/code&gt; treats the following block as an anonymous subroutine, so the semicolon is necessary.&lt;/p&gt; &lt;p&gt;Like eval(), the code executes in the same context as it would if it weren't spun off.  Since both the code inside and after the async start executing, you need to be careful with any shared resources.  Locking and other synchronization techniques are covered later.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="giving up control"&gt;Giving up control&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;There are times when you may find it useful to have a thread explicitly give up the CPU to another thread.  Your threading package might not support preemptive multitasking for threads, for example, or you may be doing something compute-intensive and want to make sure that the user-interface thread gets called frequently.  Regardless, there are times that you might want a thread to give up the processor.&lt;/p&gt; &lt;p&gt;Perl's threading package provides the &lt;code&gt;yield()&lt;/code&gt; function that does this. &lt;code&gt;yield()&lt;/code&gt; is pretty straightforward, and works like this:&lt;/p&gt; &lt;pre&gt;    use Thread qw(yield async);&lt;br /&gt;   async {&lt;br /&gt;       my $foo = 50;&lt;br /&gt;       while ($foo--) { print "first async\n" }&lt;br /&gt;       yield;&lt;br /&gt;       $foo = 50;&lt;br /&gt;       while ($foo--) { print "first async\n" }&lt;br /&gt;   };&lt;br /&gt;   async {&lt;br /&gt;       my $foo = 50;&lt;br /&gt;       while ($foo--) { print "second async\n" }&lt;br /&gt;       yield;&lt;br /&gt;       $foo = 50;&lt;br /&gt;       while ($foo--) { print "second async\n" }&lt;br /&gt;   };&lt;/pre&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="waiting for a thread to exit"&gt;Waiting For A Thread To Exit&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Since threads are also subroutines, they can return values.  To wait for a thread to exit and extract any scalars it might return, you can use the &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_join"&gt;&lt;code&gt;join()&lt;/code&gt;&lt;/a&gt; method.&lt;/p&gt; &lt;pre&gt;    use Thread;&lt;br /&gt;   $thr = new Thread \&amp;sub1;&lt;/pre&gt; &lt;pre&gt;    @ReturnData = $thr-&gt;join;&lt;br /&gt;   print "Thread returned @ReturnData";&lt;/pre&gt; &lt;pre&gt;    sub sub1 { return "Fifty-six", "foo", 2; }&lt;/pre&gt; &lt;p&gt;In the example above, the &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_join"&gt;&lt;code&gt;join()&lt;/code&gt;&lt;/a&gt; method returns as soon as the thread ends.  In addition to waiting for a thread to finish and gathering up any values that the thread might have returned, &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_join"&gt;&lt;code&gt;join()&lt;/code&gt;&lt;/a&gt; also performs any OS cleanup necessary for the thread.  That cleanup might be important, especially for long-running programs that spawn lots of threads.  If you don't want the return values and don't want to wait for the thread to finish, you should call the &lt;code&gt;detach()&lt;/code&gt; method instead. &lt;code&gt;detach()&lt;/code&gt; is covered later in the article.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="errors in threads"&gt;Errors In Threads&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;So what happens when an error occurs in a thread? Any errors that could be caught with &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_eval"&gt;&lt;code&gt;eval()&lt;/code&gt;&lt;/a&gt; are postponed until the thread is joined.  If your program never joins, the errors appear when your program exits.&lt;/p&gt; &lt;p&gt;Errors deferred until a &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_join"&gt;&lt;code&gt;join()&lt;/code&gt;&lt;/a&gt; can be caught with eval():&lt;/p&gt; &lt;pre&gt;    use Thread qw(async);&lt;br /&gt;   $thr = async {$b = 3/0};   # Divide by zero error&lt;br /&gt;   $foo = eval {$thr-&gt;join};&lt;br /&gt;   if ($@) {&lt;br /&gt;       print "died with error $@\n";&lt;br /&gt;   } else {&lt;br /&gt;       print "Hey, why aren't you dead?\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;&lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_eval"&gt;&lt;code&gt;eval()&lt;/code&gt;&lt;/a&gt; passes any results from the joined thread back unmodified, so if you want the return value of the thread, this is your only chance to get them.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="ignoring a thread"&gt;Ignoring A Thread&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;&lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_join"&gt;&lt;code&gt;join()&lt;/code&gt;&lt;/a&gt; does three things: it waits for a thread to exit, cleans up after it, and returns any data the thread may have produced.  But what if you're not interested in the thread's return values, and you don't really care when the thread finishes? All you want is for the thread to get cleaned up after when it's done.&lt;/p&gt; &lt;p&gt;In this case, you use the &lt;code&gt;detach()&lt;/code&gt; method.  Once a thread is detached, it'll run until it's finished, then Perl will clean up after it automatically.&lt;/p&gt; &lt;pre&gt;    use Thread;&lt;br /&gt;   $thr = new Thread \&amp;sub1; # Spawn the thread&lt;/pre&gt; &lt;pre&gt;    $thr-&gt;detach; # Now we officially don't care any more&lt;/pre&gt; &lt;pre&gt;    sub sub1 {&lt;br /&gt;       $a = 0;&lt;br /&gt;       while (1) {&lt;br /&gt;           $a++;&lt;br /&gt;           print "\$a is $a\n";&lt;br /&gt;           sleep 1;&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;Once a thread is detached, it may not be joined, and any output that it might have produced (if it was done and waiting for a join) is lost.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="threads and data"&gt;Threads And Data&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;Now that we've covered the basics of threads, it's time for our next topic: data.  Threading introduces a couple of complications to data access that non-threaded programs never need to worry about.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="shared and unshared data"&gt;Shared And Unshared Data&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The single most important thing to remember when using threads is that all threads potentially have access to all the data anywhere in your program.  While this is true with a nonthreaded Perl program as well, it's especially important to remember with a threaded program, since more than one thread can be accessing this data at once.&lt;/p&gt; &lt;p&gt;Perl's scoping rules don't change because you're using threads.  If a subroutine (or block, in the case of &lt;code&gt;async())&lt;/code&gt; could see a variable if you weren't running with threads, it can see it if you are.  This is especially important for the subroutines that create, and makes &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_my"&gt;&lt;code&gt;my&lt;/code&gt;&lt;/a&gt; variables even more important.  Remember--if your variables aren't lexically scoped (declared with &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_my"&gt;&lt;code&gt;my&lt;/code&gt;&lt;/a&gt;) you're probably sharing them between threads.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="thread pitfall: races"&gt;Thread Pitfall: Races&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;While threads bring a new set of useful tools, they also bring a number of pitfalls.  One pitfall is the race condition:&lt;/p&gt; &lt;pre&gt;    use Thread;&lt;br /&gt;   $a = 1;&lt;br /&gt;   $thr1 = Thread-&gt;new(\&amp;amp;sub1);&lt;br /&gt;   $thr2 = Thread-&gt;new(\&amp;amp;sub2);&lt;/pre&gt; &lt;pre&gt;    sleep 10;&lt;br /&gt;   print "$a\n";&lt;/pre&gt; &lt;pre&gt;    sub sub1 { $foo = $a; $a = $foo + 1; }&lt;br /&gt;   sub sub2 { $bar = $a; $a = $bar + 1; }&lt;/pre&gt; &lt;p&gt;What do you think $a will be? The answer, unfortunately, is ``it depends.'' Both &lt;code&gt;sub1()&lt;/code&gt; and &lt;code&gt;sub2()&lt;/code&gt; access the global variable $a, once to read and once to write.  Depending on factors ranging from your thread implementation's scheduling algorithm to the phase of the moon, $a can be 2 or 3.&lt;/p&gt; &lt;p&gt;Race conditions are caused by unsynchronized access to shared data.  Without explicit synchronization, there's no way to be sure that nothing has happened to the shared data between the time you access it and the time you update it.  Even this simple code fragment has the possibility of error:&lt;/p&gt; &lt;pre&gt;    use Thread qw(async);&lt;br /&gt;   $a = 2;&lt;br /&gt;   async{ $b = $a; $a = $b + 1; };&lt;br /&gt;   async{ $c = $a; $a = $c + 1; };&lt;/pre&gt; &lt;p&gt;Two threads both access $a.  Each thread can potentially be interrupted at any point, or be executed in any order.  At the end, $a could be 3 or 4, and both $b and $c could be 2 or 3.&lt;/p&gt; &lt;p&gt;Whenever your program accesses data or resources that can be accessed by other threads, you must take steps to coordinate access or risk data corruption and race conditions.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="controlling access: lock()"&gt;Controlling access: &lt;/a&gt;&lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt; function takes a variable (or subroutine, but we'll get to that later) and puts a lock on it.  No other thread may lock the variable until the locking thread exits the innermost block containing the lock.  Using &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt; is straightforward:&lt;/p&gt; &lt;pre&gt;    use Thread qw(async);&lt;br /&gt;   $a = 4;&lt;br /&gt;   $thr1 = async {&lt;br /&gt;       $foo = 12;&lt;br /&gt;       {&lt;br /&gt;           lock ($a); # Block until we get access to $a&lt;br /&gt;           $b = $a;&lt;br /&gt;           $a = $b * $foo;&lt;br /&gt;       }&lt;br /&gt;       print "\$foo was $foo\n";&lt;br /&gt;   };&lt;br /&gt;   $thr2 = async {&lt;br /&gt;       $bar = 7;&lt;br /&gt;       {&lt;br /&gt;           lock ($a); # Block until we can get access to $a&lt;br /&gt;           $c = $a;&lt;br /&gt;           $a = $c * $bar;&lt;br /&gt;       }&lt;br /&gt;       print "\$bar was $bar\n";&lt;br /&gt;   };&lt;br /&gt;   $thr1-&gt;join;&lt;br /&gt;   $thr2-&gt;join;&lt;br /&gt;   print "\$a is $a\n";&lt;/pre&gt; &lt;p&gt;&lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt; blocks the thread until the variable being locked is available.  When &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt; returns, your thread can be sure that no other thread can lock that variable until the innermost block containing the lock exits.&lt;/p&gt; &lt;p&gt;It's important to note that locks don't prevent access to the variable in question, only lock attempts.  This is in keeping with Perl's longstanding tradition of courteous programming, and the advisory file locking that &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_flock"&gt;&lt;code&gt;flock()&lt;/code&gt;&lt;/a&gt; gives you.  Locked subroutines behave differently, however.  We'll cover that later in the article.&lt;/p&gt; &lt;p&gt;You may lock arrays and hashes as well as scalars.  Locking an array, though, will not block subsequent locks on array elements, just lock attempts on the array itself.&lt;/p&gt; &lt;p&gt;Finally, locks are recursive, which means it's okay for a thread to lock a variable more than once.  The lock will last until the outermost &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock()&lt;/code&gt;&lt;/a&gt; on the variable goes out of scope.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="thread pitfall: deadlocks"&gt;Thread Pitfall: Deadlocks&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Locks are a handy tool to synchronize access to data.  Using them properly is the key to safe shared data.  Unfortunately, locks aren't without their dangers.  Consider the following code:&lt;/p&gt; &lt;pre&gt;    use Thread qw(async yield);&lt;br /&gt;   $a = 4;&lt;br /&gt;   $b = "foo";&lt;br /&gt;   async {&lt;br /&gt;       lock($a);&lt;br /&gt;       yield;&lt;br /&gt;       sleep 20;&lt;br /&gt;       lock ($b);&lt;br /&gt;   };&lt;br /&gt;   async {&lt;br /&gt;       lock($b);&lt;br /&gt;       yield;&lt;br /&gt;       sleep 20;&lt;br /&gt;       lock ($a);&lt;br /&gt;   };&lt;/pre&gt; &lt;p&gt;This program will probably hang until you kill it.  The only way it won't hang is if one of the two &lt;code&gt;async()&lt;/code&gt; routines acquires both locks first.  A guaranteed-to-hang version is more complicated, but the principle is the same.&lt;/p&gt; &lt;p&gt;The first thread spawned by &lt;code&gt;async()&lt;/code&gt; will grab a lock on $a then, a second or two later, try to grab a lock on $b.  Meanwhile, the second thread grabs a lock on $b, then later tries to grab a lock on $a.  The second lock attempt for both threads will block, each waiting for the other to release its lock.&lt;/p&gt; &lt;p&gt;This condition is called a deadlock, and it occurs whenever two or more threads are trying to get locks on resources that the others own.  Each thread will block, waiting for the other to release a lock on a resource.  That never happens, though, since the thread with the resource is itself waiting for a lock to be released.&lt;/p&gt; &lt;p&gt;There are a number of ways to handle this sort of problem.  The best way is to always have all threads acquire locks in the exact same order.  If, for example, you lock variables $a, $b, and $c, always lock $a before $b, and $b before $c.  It's also best to hold on to locks for as short a period of time to minimize the risks of deadlock.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="queues: passing data around"&gt;Queues: Passing Data Around&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;A queue is a special thread-safe object that lets you put data in one end and take it out the other without having to worry about synchronization issues.  They're pretty straightforward, and look like this:&lt;/p&gt; &lt;pre&gt;    use Thread qw(async);&lt;br /&gt;   use Thread::Queue;&lt;/pre&gt; &lt;pre&gt;    my $DataQueue = new Thread::Queue;&lt;br /&gt;   $thr = async {&lt;br /&gt;       while ($DataElement = $DataQueue-&gt;dequeue) {&lt;br /&gt;           print "Popped $DataElement off the queue\n";&lt;br /&gt;       }&lt;br /&gt;   };&lt;/pre&gt; &lt;pre&gt;    $DataQueue-&gt;enqueue(12);&lt;br /&gt;   $DataQueue-&gt;enqueue("A", "B", "C");&lt;br /&gt;   $DataQueue-&gt;enqueue(\$thr);&lt;br /&gt;   sleep 10;&lt;br /&gt;   $DataQueue-&gt;enqueue(undef);&lt;/pre&gt; &lt;p&gt;You create the queue with new Thread::Queue.  Then you can add lists of scalars onto the end with enqueue(), and pop scalars off the front of it with dequeue().  A queue has no fixed size, and can grow as needed to hold everything pushed on to it.&lt;/p&gt; &lt;p&gt;If a queue is empty, &lt;code&gt;dequeue()&lt;/code&gt; blocks until another thread enqueues something.  This makes queues ideal for event loops and other communications between threads.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="threads and code"&gt;Threads And Code&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;In addition to providing thread-safe access to data via locks and queues, threaded Perl also provides general-purpose semaphores for coarser synchronization than locks provide and thread-safe access to entire subroutines.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="semaphores: synchronizing data access"&gt;Semaphores: Synchronizing Data Access&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Semaphores are a kind of generic locking mechanism.  Unlike lock, which gets a lock on a particular scalar, Perl doesn't associate any particular thing with a semaphore so you can use them to control access to anything you like.  In addition, semaphores can allow more than one thread to access a resource at once, though by default semaphores only allow one thread access at a time.&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;&lt;a name="item_Basic_semaphores"&gt;Basic semaphores&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dd&gt; Semaphores have two methods, down and up. down decrements the resource count, while up increments it.  down calls will block if the semaphore's current count would decrement below zero.  This program gives a quick demonstration: &lt;pre&gt;    use Thread qw(yield);&lt;br /&gt;   use Thread::Semaphore;&lt;br /&gt;   my $semaphore = new Thread::Semaphore;&lt;br /&gt;   $GlobalVariable = 0;&lt;/pre&gt; &lt;pre&gt;    $thr1 = new Thread \&amp;amp;sample_sub, 1;&lt;br /&gt;   $thr2 = new Thread \&amp;amp;sample_sub, 2;&lt;br /&gt;   $thr3 = new Thread \&amp;amp;sample_sub, 3;&lt;/pre&gt; &lt;pre&gt;    sub sample_sub {&lt;br /&gt;       my $SubNumber = shift @_;&lt;br /&gt;       my $TryCount = 10;&lt;br /&gt;       my $LocalCopy;&lt;br /&gt;       sleep 1;&lt;br /&gt;       while ($TryCount--) {&lt;br /&gt;           $semaphore-&gt;down;&lt;br /&gt;           $LocalCopy = $GlobalVariable;&lt;br /&gt;           print "$TryCount tries left for sub $SubNumber (\$GlobalVariable is $GlobalVariable)\n";&lt;br /&gt;           yield;&lt;br /&gt;           sleep 2;&lt;br /&gt;           $LocalCopy++;&lt;br /&gt;           $GlobalVariable = $LocalCopy;&lt;br /&gt;           $semaphore-&gt;up;&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;The three invocations of the subroutine all operate in sync.  The semaphore, though, makes sure that only one thread is accessing the global variable at once.&lt;/p&gt;  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;a name="item_Advanced_Semaphores"&gt;Advanced Semaphores&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/dt&gt;&lt;dd&gt; By default, semaphores behave like locks, letting only one thread &lt;code&gt;down()&lt;/code&gt; them at a time.  However, there are other uses for semaphores. &lt;p&gt;Each semaphore has a counter attached to it. &lt;code&gt;down()&lt;/code&gt; decrements the counter and &lt;code&gt;up()&lt;/code&gt; increments the counter.  By default, semaphores are created with the counter set to one, &lt;code&gt;down()&lt;/code&gt; decrements by one, and &lt;code&gt;up()&lt;/code&gt; increments by one.  If &lt;code&gt;down()&lt;/code&gt; attempts to decrement the counter below zero, it blocks until the counter is large enough.  Note that while a semaphore can be created with a starting count of zero, any &lt;code&gt;up()&lt;/code&gt; or &lt;code&gt;down()&lt;/code&gt; always changes the counter by at least one. $semaphore-&gt;&lt;code&gt;down(0)&lt;/code&gt; is the same as $semaphore-&gt;down(1).&lt;/p&gt; &lt;p&gt;The question, of course, is why would you do something like this? Why create a semaphore with a starting count that's not one, or why decrement/increment it by more than one? The answer is resource availability.  Many resources that you want to manage access for can be safely used by more than one thread at once.&lt;/p&gt; &lt;p&gt;For example, let's take a GUI driven program.  It has a semaphore that it uses to synchronize access to the display, so only one thread is ever drawing at once.  Handy, but of course you don't want any thread to start drawing until things are properly set up.  In this case, you can create a semaphore with a counter set to zero, and up it when things are ready for drawing.&lt;/p&gt; &lt;p&gt;Semaphores with counters greater than one are also useful for establishing quotas.  Say, for example, that you have a number of threads that can do I/O at once.  You don't want all the threads reading or writing at once though, since that can potentially swamp your I/O channels, or deplete your process' quota of filehandles.  You can use a semaphore initialized to the number of concurrent I/O requests (or open files) that you want at any one time, and have your threads quietly block and unblock themselves.&lt;/p&gt; &lt;p&gt;Larger increments or decrements are handy in those cases where a thread needs to check out or return a number of resources at once.&lt;/p&gt; &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="attributes: restricting access to subroutines"&gt;Attributes: Restricting Access To Subroutines&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;In addition to synchronizing access to data or resources, you might find it useful to synchronize access to subroutines.  You may be accessing a singular machine resource (perhaps a vector processor), or find it easier to serialize calls to a particular subroutine than to have a set of locks and sempahores.&lt;/p&gt; &lt;p&gt;One of the additions to Perl 5.005 is subroutine attributes.  The Thread package uses these to provide several flavors of serialization.  It's important to remember that these attributes are used in the compilation phase of your program so you can't change a subroutine's behavior while your program is actually running.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="subroutine locks"&gt;Subroutine Locks&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The basic subroutine lock looks like this:&lt;/p&gt; &lt;pre&gt;    sub test_sub :locked {&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;This ensures that only one thread will be executing this subroutine at any one time.  Once a thread calls this subroutine, any other thread that calls it will block until the thread in the subroutine exits it.  A more elaborate example looks like this:&lt;/p&gt; &lt;pre&gt;    use Thread qw(yield);&lt;/pre&gt; &lt;pre&gt;    new Thread \&amp;amp;thread_sub, 1;&lt;br /&gt;   new Thread \&amp;amp;thread_sub, 2;&lt;br /&gt;   new Thread \&amp;amp;thread_sub, 3;&lt;br /&gt;   new Thread \&amp;amp;thread_sub, 4;&lt;/pre&gt; &lt;pre&gt;    sub sync_sub :locked {&lt;br /&gt;       my $CallingThread = shift @_;&lt;br /&gt;       print "In sync_sub for thread $CallingThread\n";&lt;br /&gt;       yield;&lt;br /&gt;       sleep 3;&lt;br /&gt;       print "Leaving sync_sub for thread $CallingThread\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;pre&gt;    sub thread_sub {&lt;br /&gt;       my $ThreadID = shift @_;&lt;br /&gt;       print "Thread $ThreadID calling sync_sub\n";&lt;br /&gt;       sync_sub($ThreadID);&lt;br /&gt;       print "$ThreadID is done with sync_sub\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;The &lt;code&gt;locked&lt;/code&gt; attribute tells perl to lock sync_sub(), and if you run this, you can see that only one thread is in it at any one time.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="methods"&gt;Methods&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Locking an entire subroutine can sometimes be overkill, especially when dealing with Perl objects.  When calling a method for an object, for example, you want to serialize calls to a method, so that only one thread will be in the subroutine for a particular object, but threads calling that subroutine for a different object aren't blocked.  The method attribute indicates whether the subroutine is really a method.&lt;/p&gt; &lt;pre&gt;    use Thread;&lt;/pre&gt; &lt;pre&gt;    sub tester {&lt;br /&gt;       my $thrnum = shift @_;&lt;br /&gt;       my $bar = new Foo;&lt;br /&gt;       foreach (1..10) {      &lt;br /&gt;           print "$thrnum calling per_object\n";&lt;br /&gt;           $bar-&gt;per_object($thrnum); &lt;br /&gt;           print "$thrnum out of per_object\n";&lt;br /&gt;           yield;&lt;br /&gt;           print "$thrnum calling one_at_a_time\n";&lt;br /&gt;           $bar-&gt;one_at_a_time($thrnum);      &lt;br /&gt;           print "$thrnum out of one_at_a_time\n";&lt;br /&gt;           yield;&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt; &lt;pre&gt;    foreach my $thrnum (1..10) {&lt;br /&gt;       new Thread \&amp;amp;tester, $thrnum;&lt;br /&gt;   }&lt;/pre&gt; &lt;pre&gt;    package Foo;&lt;br /&gt;   sub new {&lt;br /&gt;       my $class = shift @_;&lt;br /&gt;       return bless [@_], $class;&lt;br /&gt;   }&lt;/pre&gt; &lt;pre&gt;    sub per_object :locked :method {&lt;br /&gt;       my ($class, $thrnum) = @_;&lt;br /&gt;       print "In per_object for thread $thrnum\n";&lt;br /&gt;       yield;&lt;br /&gt;       sleep 2;&lt;br /&gt;       print "Exiting per_object for thread $thrnum\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;pre&gt;    sub one_at_a_time :locked {&lt;br /&gt;       my ($class, $thrnum) = @_;&lt;br /&gt;       print "In one_at_a_time for thread $thrnum\n";    &lt;br /&gt;       yield;&lt;br /&gt;       sleep 2;&lt;br /&gt;       print "Exiting one_at_a_time for thread $thrnum\n";&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;As you can see from the output (omitted for brevity; it's 800 lines) all the threads can be in &lt;code&gt;per_object()&lt;/code&gt; simultaneously, but only one thread is ever in &lt;code&gt;one_at_a_time()&lt;/code&gt; at once.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="locking a subroutine"&gt;Locking A Subroutine&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;You can lock a subroutine as you would lock a variable.  Subroutine locks work the same as specifying a &lt;code&gt;locked&lt;/code&gt; attribute for the subroutine, and block all access to the subroutine for other threads until the lock goes out of scope.  When the subroutine isn't locked, any number of threads can be in it at once, and getting a lock on a subroutine doesn't affect threads already in the subroutine.  Getting a lock on a subroutine looks like this:&lt;/p&gt; &lt;pre&gt;    lock(\&amp;amp;sub_to_lock);&lt;/pre&gt; &lt;p&gt;Simple enough.  Unlike the &lt;code&gt;locked&lt;/code&gt; attribute, which is a compile time option, locking and unlocking a subroutine can be done at runtime at your discretion.  There is some runtime penalty to using &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock(\&amp;amp;sub)&lt;/code&gt;&lt;/a&gt; instead of the &lt;code&gt;locked&lt;/code&gt; attribute, so make sure you're choosing the proper method to do the locking.&lt;/p&gt; &lt;p&gt;You'd choose &lt;a href="http://www.xav.com/perl/lib/Pod/perlfunc.html#item_lock"&gt;&lt;code&gt;lock(\&amp;amp;sub)&lt;/code&gt;&lt;/a&gt; when writing modules and code to run on both threaded and unthreaded Perl, especially for code that will run on 5.004 or earlier Perls.  In that case, it's useful to have subroutines that should be serialized lock themselves if they're running threaded, like so:&lt;/p&gt; &lt;pre&gt;    package Foo;&lt;br /&gt;   use Config;&lt;br /&gt;   $Running_Threaded = 0;&lt;/pre&gt; &lt;pre&gt;    BEGIN { $Running_Threaded = $Config{'usethreads'} }&lt;/pre&gt; &lt;pre&gt;    sub sub1 { lock(\&amp;amp;sub1) if $Running_Threaded }&lt;/pre&gt; &lt;p&gt;This way you can ensure single-threadedness regardless of which version of Perl you're running.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="general thread utility routines"&gt;General Thread Utility Routines&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;We've covered the workhorse parts of Perl's threading package, and with these tools you should be well on your way to writing threaded code and packages.  There are a few useful little pieces that didn't really fit in anyplace else.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="what thread am i in"&gt;What Thread Am I In?&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The Thread-&gt;self method provides your program with a way to get an object representing the thread it's currently in.  You can use this object in the same way as the ones returned from the thread creation.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="thread ids"&gt;Thread IDs&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;&lt;code&gt;tid()&lt;/code&gt; is a thread object method that returns the thread ID of the thread the object represents.  Thread IDs are integers, with the main thread in a program being 0.  Currently Perl assigns a unique tid to every thread ever created in your program, assigning the first thread to be created a tid of 1, and increasing the tid by 1 for each new thread that's created.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="are these threads the same"&gt;Are These Threads The Same?&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;The &lt;code&gt;equal()&lt;/code&gt; method takes two thread objects and returns true  if the objects represent the same thread, and false if they don't.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="what threads are running"&gt;What Threads Are Running?&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Thread-&gt;list returns a list of thread objects, one for each thread that's currently running.  Handy for a number of things, including cleaning up at the end of your program:&lt;/p&gt; &lt;pre&gt;    # Loop through all the threads&lt;br /&gt;   foreach $thr (Thread-&gt;list) {&lt;br /&gt;       # Don't join the main thread or ourselves&lt;br /&gt;       if ($thr-&gt;tid &amp;amp;&amp;amp; !Thread::equal($thr, Thread-&gt;self)) {&lt;br /&gt;           $thr-&gt;join;&lt;br /&gt;       }&lt;br /&gt;   }&lt;/pre&gt; &lt;p&gt;The example above is just for illustration.  It isn't strictly necessary to join all the threads you create, since Perl detaches all the threads before it exits.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="a complete example"&gt;A Complete Example&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;Confused yet? It's time for an example program to show some of the things we've covered.  This program finds prime numbers using threads.&lt;/p&gt; &lt;pre&gt;    1  #!/usr/bin/perl -w&lt;br /&gt;   2  # prime-pthread, courtesy of Tom Christiansen&lt;br /&gt;   3&lt;br /&gt;   4  use strict;&lt;br /&gt;   5&lt;br /&gt;   6  use Thread;&lt;br /&gt;   7  use Thread::Queue;&lt;br /&gt;   8&lt;br /&gt;   9  my $stream = new Thread::Queue;&lt;br /&gt;   10 my $kid    = new Thread(\&amp;amp;check_num, $stream, 2);&lt;br /&gt;   11&lt;br /&gt;   12 for my $i ( 3 .. 1000 ) {&lt;br /&gt;   13     $stream-&gt;enqueue($i);&lt;br /&gt;   14 }&lt;br /&gt;   15&lt;br /&gt;   16 $stream-&gt;enqueue(undef);&lt;br /&gt;   17 $kid-&gt;join();&lt;br /&gt;   18&lt;br /&gt;   19 sub check_num {&lt;br /&gt;   20     my ($upstream, $cur_prime) = @_;&lt;br /&gt;   21     my $kid;&lt;br /&gt;   22     my $downstream = new Thread::Queue;&lt;br /&gt;   23     while (my $num = $upstream-&gt;dequeue) {&lt;br /&gt;   24         next unless $num % $cur_prime;&lt;br /&gt;   25         if ($kid) {&lt;br /&gt;   26            $downstream-&gt;enqueue($num);&lt;br /&gt;   27                  } else {&lt;br /&gt;   28            print "Found prime $num\n";&lt;br /&gt;   29                $kid = new Thread(\&amp;amp;check_num, $downstream, $num);&lt;br /&gt;   30         }&lt;br /&gt;   31     }&lt;br /&gt;   32     $downstream-&gt;enqueue(undef) if $kid;&lt;br /&gt;   33     $kid-&gt;join()         if $kid;&lt;br /&gt;   34 }&lt;/pre&gt; &lt;p&gt;This program uses the pipeline model to generate prime numbers.  Each thread in the pipeline has an input queue that feeds numbers to be checked, a prime number that it's responsible for, and an output queue that it funnels numbers that have failed the check into.  If the thread has a number that's failed its check and there's no child thread, then the thread must have found a new prime number.  In that case, a new child thread is created for that prime and stuck on the end of the pipeline.&lt;/p&gt; &lt;p&gt;This probably sounds a bit more confusing than it really is, so lets go through this program piece by piece and see what it does.  (For those of you who might be trying to remember exactly what a prime number is, it's a number that's only evenly divisible by itself and 1)&lt;/p&gt; &lt;p&gt;The bulk of the work is done by the &lt;code&gt;check_num()&lt;/code&gt; subroutine, which takes a reference to its input queue and a prime number that it's responsible for.  After pulling in the input queue and the prime that the subroutine's checking (line 20), we create a new queue (line 22) and reserve a scalar for the thread that we're likely to create later (line 21).&lt;/p&gt; &lt;p&gt;The while loop from lines 23 to line 31 grabs a scalar off the input queue and checks against the prime this thread is responsible for.  Line 24 checks to see if there's a remainder when we modulo the number to be checked against our prime.  If there is one, the number must not be evenly divisible by our prime, so we need to either pass it on to the next thread if we've created one (line 26) or create a new thread if we haven't.&lt;/p&gt; &lt;p&gt;The new thread creation is line 29.  We pass on to it a reference to the queue we've created, and the prime number we've found.&lt;/p&gt; &lt;p&gt;Finally, once the loop terminates (because we got a 0 or undef in the queue, which serves as a note to die), we pass on the notice to our child and wait for it to exit if we've created a child (Lines 32 and 37).&lt;/p&gt; &lt;p&gt;Meanwhile, back in the main thread, we create a queue (line 9) and the initial child thread (line 10), and pre-seed it with the first prime: 2.  Then we queue all the numbers from 3 to 1000 for checking (lines 12-14), then queue a die notice (line 16) and wait for the first child thread to terminate (line 17).  Because a child won't die until its child has died, we know that we're done once we return from the join.&lt;/p&gt; &lt;p&gt;That's how it works.  It's pretty simple; as with many Perl programs, the explanation is much longer than the program.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="conclusion"&gt;Conclusion&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;A complete thread tutorial could fill a book (and has, many times), but this should get you well on your way.  The final authority on how Perl's threads behave is the documention bundled with the Perl distribution, but with what we've covered in this article, you should be well on your way to becoming a threaded Perl expert.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="bibliography"&gt;Bibliography&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;Here's a short bibliography courtesy of Jürgen Christoffel:&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="introductory texts"&gt;Introductory Texts&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Birrell, Andrew D. An Introduction to Programming with Threads. Digital Equipment Corporation, 1989, DEC-SRC Research Report #35 online as &lt;a href="http://www.xav.com/perl/ax.pl?http://www.research.digital.com/SRC/staff/birrell/bib.html"&gt;http://www.research.digital.com/SRC/staff/birrell/bib.html&lt;/a&gt; (highly recommended)&lt;/p&gt; &lt;p&gt;Robbins, Kay. A., and Steven Robbins. Practical Unix Programming: A Guide to Concurrency, Communication, and Multithreading. Prentice-Hall, 1996.&lt;/p&gt; &lt;p&gt;Lewis, Bill, and Daniel J. Berg. Multithreaded Programming with Pthreads. Prentice Hall, 1997, ISBN 0-13-443698-9 (a well-written introduction to threads).&lt;/p&gt; &lt;p&gt;Nelson, Greg (editor). Systems Programming with Modula-3.  Prentice Hall, 1991, ISBN 0-13-590464-1.&lt;/p&gt; &lt;p&gt;Nichols, Bradford, Dick Buttlar, and Jacqueline Proulx Farrell. Pthreads Programming. O'Reilly &amp;amp; Associates, 1996, ISBN 156592-115-1 (covers POSIX threads).&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="osrelated references"&gt;OS-Related References&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Boykin, Joseph, David Kirschen, Alan Langerman, and Susan LoVerso. Programming under Mach. Addison-Wesley, 1994, ISBN 0-201-52739-1.&lt;/p&gt; &lt;p&gt;Tanenbaum, Andrew S. Distributed Operating Systems. Prentice Hall, 1995, ISBN 0-13-143934-0 (great textbook).&lt;/p&gt; &lt;p&gt;Silberschatz, Abraham, and Peter B. Galvin. Operating System Concepts, 4th ed. Addison-Wesley, 1995, ISBN 0-201-59292-4&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;h2&gt;&lt;a name="other references"&gt;Other References&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Arnold, Ken and James Gosling. The Java Programming Language, 2nd ed. Addison-Wesley, 1998, ISBN 0-201-31006-6.&lt;/p&gt; &lt;p&gt;Le Sergent, T. and B. Berthomieu. ``Incremental MultiThreaded Garbage Collection on Virtually Shared Memory Architectures'' in Memory Management: Proc. of the International Workshop IWMM 92, St. Malo, France, September 1992, Yves Bekkers and Jacques Cohen, eds. Springer, 1992, ISBN 3540-55940-X (real-life thread applications).&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="acknowledgements"&gt;Acknowledgements&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;Thanks (in no particular order) to Chaim Frenkel, Steve Fink, Gurusamy Sarathy, Ilya Zakharevich, Benjamin Sugars, Jürgen Christoffel, Joshua Pritikin, and Alan Burlison, for their help in reality-checking and polishing this article.  Big thanks to Tom Christiansen for his rewrite of the prime number generator.&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="author"&gt;AUTHOR&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;Dan Sugalski &lt;&lt;a href="mailto:sugalskd@ous.edu"&gt;sugalskd@ous.edu&lt;/a&gt;&gt;&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;hr /&gt; &lt;h1&gt;&lt;a name="copyrights"&gt;Copyrights&lt;/a&gt;&lt;/h1&gt; &lt;p&gt;This article originally appeared in The Perl Journal #10, and is copyright 1998 The Perl Journal. It appears courtesy of Jon Orwant and The Perl Journal.  This document may be distributed under the same terms as Perl itself.&lt;/p&gt;   &lt;span style="font-size:+1;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Heshan Wanigasooriya&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7615580403874889653-176131659886792709?l=heshanmw.blogspot.com' alt='' /&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=5EU1Z5RPvOw:LFA3V4cjbwg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?a=5EU1Z5RPvOw:LFA3V4cjbwg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Bugz-burnerTech-pump?i=5EU1Z5RPvOw:LFA3V4cjbwg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Bugz-burnerTech-pump/~4/5EU1Z5RPvOw" height="1" width="1"/&gt;</description><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-08T13:40:32.234+05:30</app:edited><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://heshanmw.blogspot.com/2008/04/tutorial-on-threads-in-perl.html</feedburner:origLink></item><copyright>©2008 Copyrights Heshan Wanigasooriya</copyright><media:credit role="author">Heshan Wanigasooriya</media:credit><media:rating>nonadult</media:rating><media:description type="plain">www.heshanonline.tk</media:description></channel></rss>

