<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-3090597690624991281</atom:id><lastBuildDate>Mon, 28 Nov 2011 01:29:38 +0000</lastBuildDate><title>PERL TIPS</title><description /><link>http://sheela-perltips.blogspot.com/</link><managingEditor>noreply@blogger.com (SHEELA)</managingEditor><generator>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MyPerlTips" /><feedburner:info uri="myperltips" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-8732278927222910000</guid><pubDate>Tue, 25 Sep 2007 05:26:00 +0000</pubDate><atom:updated>2007-09-25T11:02:35.642+05:30</atom:updated><title>Arrays of Arrays</title><description>How do we preserve the data as three unique arrays? An array can only contain scalars. Luckily we know that a reference is a scalar. Let's create an array of array references!&lt;br /&gt;   # we have separate arrays we want to combine  &lt;br /&gt;   my @austin_toys   = qw(perl pizzastone pilobolus);  &lt;br /&gt;   my @justin_toys   = ('hack saw', 'boots', 'grout');   &lt;br /&gt;   my @reinhard_toys = ('OED', 'oatmeal', 'orange juice');&lt;br /&gt;&lt;br /&gt;   # we could do this: (an array of array refs) &lt;br /&gt;   my @toys = ( \@austin_toys, \@justin_toys, \@reinhard_toys ); &lt;br /&gt;   print "Reinhard's 1st toy is a $toys[2]-&gt;[0]\n";&lt;br /&gt;   print "Reinhard's 1st toy is a $toys[2][0]\n";&lt;br /&gt;&lt;br /&gt;   # or this: (an array ref of array refs) &lt;br /&gt;   my $toys = [ \@austin_toys, \@justin_toys, \@reinhard_toys ];&lt;br /&gt;   print "Reinhard's 1st toy is a $toys-&gt;[2][0]\n";&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-8732278927222910000?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/8kdjRukRA9o/arrays-of-arrays.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>1</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/09/arrays-of-arrays.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-4803995329824384925</guid><pubDate>Wed, 19 Sep 2007 09:55:00 +0000</pubDate><atom:updated>2007-09-19T15:28:45.117+05:30</atom:updated><title>Occurence of each value in a list.</title><description>Usual approach is&lt;br /&gt;@list=(1,2,3,4,5,4,3,2,1,2,3,4,5,4,3,2,1);&lt;br /&gt;for (@list) {&lt;br /&gt;$count++ if $_ eq "3";&lt;br /&gt;}&lt;br /&gt;We can smarten this by using grep function.&lt;br /&gt;$count = grep $_ eq "3", @list;&lt;br /&gt;But when we need the number of 4 or 5, we must repeat the  above again.&lt;br /&gt;This can be made easy by hash in a single line as,&lt;br /&gt;my %count;&lt;br /&gt;$count{$_}++ for @list;&lt;br /&gt;foreach $key (keys %count){&lt;br /&gt;   print $key."\t".$count{$key}."\n";&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-4803995329824384925?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/XrKMgNDf1Xc/occurence-of-each-value-in-list.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/09/occurence-of-each-value-in-list.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-1494630048665568208</guid><pubDate>Tue, 18 Sep 2007 07:30:00 +0000</pubDate><atom:updated>2007-09-18T13:50:19.191+05:30</atom:updated><title>Regex - Replacement Count</title><description>When you bind a variable to a substitution, the expression as a whole will return the number of substitutions made, e.g. ,&lt;br /&gt;$replacements =$myvar =~s/foo/bar/g;&lt;br /&gt;$replacements will give you the total count of replacements.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-1494630048665568208?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/lehMTL2F_bM/regex-replacement-count.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/09/regex-replacement-count.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-5659785493307327879</guid><pubDate>Tue, 18 Sep 2007 07:21:00 +0000</pubDate><atom:updated>2007-09-18T12:56:49.958+05:30</atom:updated><title>Fast Way..</title><description>Need a fast way of getting rid of the second half of an array?&lt;br /&gt;Simply divide $#array by two, where array is the name of the @array.&lt;br /&gt;$#array /= 2;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-5659785493307327879?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/J7iI0_d4aEE/fast-way.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/09/fast-way.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-5552552163114660183</guid><pubDate>Tue, 11 Sep 2007 07:19:00 +0000</pubDate><atom:updated>2007-09-11T12:57:25.865+05:30</atom:updated><title>Shortcuts with the Arrow Notation</title><description>Perl provides an alternate and easier-to-read syntax for accessing array or hash elements: the -&gt;[ ] notation. For example, given the array's reference, you can obtain the second element of the array like this:&lt;br /&gt;$rarray = \@array;&lt;br /&gt;print $rarray-&gt;[1] ; # The "visually clean" way&lt;br /&gt;instead of the approaches we have seen earlier:&lt;br /&gt;print $$rarray[1]; # Noisy&lt;br /&gt;#or&lt;br /&gt;print ${$rarray}[1];&lt;br /&gt;&lt;br /&gt;Similarly, you can use the -&gt;{ } notation to access an element of a hash table:&lt;br /&gt;$rhash = \%hash;&lt;br /&gt;print $rhash-&gt;{"k1"};&lt;br /&gt;#instead of ........&lt;br /&gt;print $$rhash{"k1"};&lt;br /&gt;# or&lt;br /&gt;print ${$rhash}{"k1"};&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-5552552163114660183?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/wOTnB3GamjI/shortcuts-with-arrow-notation.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/09/shortcuts-with-arrow-notation.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-30999611525137765</guid><pubDate>Thu, 06 Sep 2007 09:58:00 +0000</pubDate><atom:updated>2007-09-06T15:32:05.044+05:30</atom:updated><title>10 Perl modules for JAVA</title><description>&lt;a href="http://search.cpan.org/~metzzo/Java-4.7/" target="_blank"&gt;Java&lt;/a&gt;&lt;br /&gt;This module provides a framework to start a local, or connect to a remote, Java Virtual Machine (JVM). It includes support for VM localization, object creation, method invocation, event listeners and loops, and exceptions.&lt;br /&gt;Use this module when you need to connect to a local or remote JVM through Perl.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~patl/Inline-Java-0.51/Java.pod" target="_blank"&gt;Inline::Java&lt;/a&gt;&lt;br /&gt;This module is one of the most useful for Java developers switching over to Perl, because it allows them to embed Java code as-is into a Perl script. This code is then automatically compiled and invoked as needed by the Perl interpreter. The module includes support for environment variables, type casting, shared JVMs, arrays, objects and exceptions.&lt;br /&gt;Use this module when you need to embed Java code directly in a Perl script.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~rusekd/Java-Import-0.03/lib/Java/Import.pm" target="_blank"&gt;Java::Import&lt;/a&gt;&lt;br /&gt;This module makes it easy to import and access Java classes from Perl. It includes the ability to call static methods, pass arguments and process return values, work with Java-based data structures, and handle exceptions.&lt;br /&gt;Use this module when you need to access a Java class from a Perl script.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~philcrow/Java-Build-0.05/Build.pm" target="_blank"&gt;Java::Build&lt;/a&gt;&lt;br /&gt;This module provides an alternative to Ant, the traditional Java build tool. It combines Perl's scripting abilities with the standard Java build/package toolset.&lt;br /&gt;Use this module when you require greater control over the build/package process for a Java class.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~philcrow/Java-Swing-0.12/Swing.pm" target="_blank"&gt;Java::Swing&lt;/a&gt;&lt;br /&gt;The Swing toolkit provides sophisticated GUI controls (toolbars, buttons, and selectors) for Java applications. This module provides an object-based interface to core Swing API calls, and includes support for extended components, listeners and other wrappers.&lt;br /&gt;Use this module when you need to access Java Swing functions through Perl.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~timb/JDBC-0.01/lib/JDBC.pm" target="_blank"&gt;JDBC&lt;/a&gt;&lt;br /&gt;This module provides an interface to various database systems using JDBC. It includes support for database connections, query execution and result set retrieval, prepared statements and error handling.&lt;br /&gt;Use this module when you need to connect to an RDBMS through a JDBC "pipe", perhaps to make use of a custom JDBC driver class.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~wiggly/Java-SJ-0.01/lib/Java/SJ.pm" target="_blank"&gt;Java::SJ&lt;/a&gt;&lt;br /&gt;This module provides a framework to customize Java VM configuration, making it possible to run multiple VMs, each with a different startup configuration and service profile. Configurations are expressed in XML.&lt;br /&gt;Use this module when you need to run multiple Java VMs simultaneously on the same system.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~lbrocard/Java-JVM-Classfile-0.19/lib/Java/JVM/Classfile.pm" target="_blank"&gt;Java::JVM::Classfile&lt;/a&gt;&lt;br /&gt;This module reads and parses JVM classfiles and expresses the information within them as a series of objects. Various methods are available to retrieve specific information about class methods, properties and visibility.&lt;br /&gt;Use this module to retrieve detailed information about the objects and classes defined in a JVM classfile.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~rkitover/Template-Plugin-Java-0.4/lib/Template/Plugin/Java.pm" target="_blank"&gt;Template::Plugin::Java&lt;/a&gt;&lt;br /&gt;This module provides a framework for describing Java classes in XML and then transforming these XML descriptions into Java source code. The XML description may include descriptions of variables and methods, and includes support for type casting and arrays. Two operation modes are supported: command-line, and embedded within a template.&lt;br /&gt;Use this module when you need to create class templates in a standard, easily-parseable format, perhaps for use on different platforms.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://search.cpan.org/~hanenkamp/Java-JCR-0.07/lib/Java/JCR/Jackrabbit.pm" target="_blank"&gt;Java::JCR::Jackrabbit&lt;/a&gt;&lt;br /&gt;This module makes it possible to connect to, and manipulate, a Jackrabbit (JCR) content repository through Perl. It includes support for custom nodes.&lt;br /&gt;Use this module when you need to access a Jackrabbit content repository.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-30999611525137765?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/obXsCfSLuQs/10-perl-modules-for-java.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/09/10-perl-modules-for-java.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-8995161976983241937</guid><pubDate>Wed, 29 Aug 2007 12:54:00 +0000</pubDate><atom:updated>2007-08-29T18:34:32.963+05:30</atom:updated><title>Optimize for speed</title><description>Perl comes with a very handy module to help you evaluate the relative speed of different code snippets.&lt;br /&gt;&lt;br /&gt;The &lt;strong&gt;Benchmark&lt;/strong&gt; module comes with a function that will take a hash of code snippets and a number. The module will run each code snippet that many times and report the speed of each for you to compare.&lt;br /&gt;&lt;br /&gt;use Benchmark;&lt;br /&gt;$string = "The bitter end.\n";&lt;br /&gt;$code{chomp} = 'chomp $string';&lt;br /&gt;$code{regex} = '$string =~ s/\n$//';&lt;br /&gt;timethese(10_000_000, \%code);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-8995161976983241937?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/Kj9uqct1tdk/optimize-for-speed.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>1</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/08/optimize-for-speed.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-3037972138516888358</guid><pubDate>Wed, 29 Aug 2007 06:53:00 +0000</pubDate><atom:updated>2007-08-29T12:32:41.321+05:30</atom:updated><title>Devel::DProf</title><description>The Devel::DProf package is a Perl code profiler. This will collect information on the execution time of a Perl script and of the subs in that script. This information can be used to determine which subroutines are using the most time and which subroutines are being called most often. This information can also be used to create an execution graph of the script, showing subroutine relationships.&lt;br /&gt;&lt;br /&gt;So to profile script test.pl the following command should be used:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;perl -d:DProf test.pl&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;When the script terminates (or when the output buffer is filled) the profiler will dump the profile information to a file called &lt;strong&gt;tmon.out&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;A tool like dprofpp can be used to interpret the information which is in that profile.&lt;br /&gt;&lt;strong&gt;dprofpp&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;To print an execution graph of the subroutines in the script use the following command:&lt;br /&gt;&lt;strong&gt;dprofpp -T&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-3037972138516888358?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/J7wVKAUh91w/develdprof.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/08/develdprof.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-2593356989815124605</guid><pubDate>Tue, 28 Aug 2007 11:05:00 +0000</pubDate><atom:updated>2007-08-28T16:36:32.007+05:30</atom:updated><title>Smart::Comments</title><description>Smart comments provide an easy way to insert debugging and tracking code into a program. They can report the value of a variable, track the progress of a loop, and verify that particular assertions are true.&lt;br /&gt;&lt;br /&gt;All smart comments start with three (or more) # characters. That is, they are regular #-introduced comments whose first two (or more) characters are also #'s.&lt;br /&gt;&lt;br /&gt;use Smart::Comments;&lt;br /&gt;### [] Acquiring data...&lt;br /&gt;for $i (0 .. 100) { ### Processing ==[%]&lt;br /&gt;think_about($i);&lt;br /&gt;}&lt;br /&gt;sub think_about {&lt;br /&gt;sleep 1; # deep ponder&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;the above program would print a cool animated progress bar.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-2593356989815124605?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/KcXZULFYOG0/smartcomments.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/08/smartcomments.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-3384194645456404460</guid><pubDate>Tue, 28 Aug 2007 10:58:00 +0000</pubDate><atom:updated>2007-08-28T16:29:59.259+05:30</atom:updated><title>B::Fathom</title><description>A module to evaluate the readability of Perl code.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;perl -MO=Fathom ScriptName&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;B::Fathom is a backend to the Perl compiler; it analyzes the syntax of your Perl code, and estimates the readability of your program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-3384194645456404460?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/Xu1E6QaxTy0/bfathom.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/08/bfathom.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-4298680927313197889</guid><pubDate>Tue, 28 Aug 2007 07:06:00 +0000</pubDate><atom:updated>2007-08-28T12:47:05.215+05:30</atom:updated><title>Perl-Tidy</title><description>Perltidy is a tool to indent and reformat perl scripts. It can also write scripts in html format.&lt;br /&gt;&lt;br /&gt;Try it in your command prompt as:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;perltidy perlprgname.pl&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;For safety, perltidy never overwrites your original file. In this case, its output will go to a file named perlprgname.pl.tdy&lt;br /&gt;&lt;br /&gt;Not only does it nicely format code, it does an excellent job of telling you where your syntax errors are.&lt;br /&gt;&lt;br /&gt;Error report will be in&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;perlprgname.pl.ERR&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;If you want the Perl as html just type in:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;perltidy -html perlprgname.pl&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-4298680927313197889?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/WoDPEnJLnb4/perl-tidy.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>0</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/08/perl-tidy.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-3090597690624991281.post-1857813248637439019</guid><pubDate>Tue, 28 Aug 2007 07:00:00 +0000</pubDate><atom:updated>2007-08-28T12:35:05.862+05:30</atom:updated><title>Use Perl to create PDF</title><description>The PDF::API2 package is used widely to create and manipulate PDF.&lt;br /&gt;&lt;br /&gt;CODE:&lt;br /&gt;use PDF::API2;&lt;br /&gt;my $pdf = PDF::API2-&gt;new(-file =&gt; "HelloWorld.pdf");&lt;br /&gt;$pdf-&gt;mediabox(595,842);&lt;br /&gt;my $page = $pdf-&gt;page;&lt;br /&gt;my $fnt = $pdf-&gt;corefont('Arial',-encoding =&gt; 'latin1');&lt;br /&gt;my $txt = $page-&gt;text;&lt;br /&gt;$txt-&gt;textstart;$txt-&gt;font($fnt, 20);&lt;br /&gt;$txt-&gt;translate(100,800);&lt;br /&gt;$txt-&gt;text("Hello Sheela! left-aligned");&lt;br /&gt;$txt-&gt;translate(500,750);&lt;br /&gt;$txt-&gt;text_right("Hello Sheela! right-aligned");&lt;br /&gt;$txt-&gt;translate(300,700);$txt-&gt;text_center("Hello Sheela! center-aligned");&lt;br /&gt;$txt-&gt;textend;$pdf-&gt;save;$pdf-&gt;end();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3090597690624991281-1857813248637439019?l=sheela-perltips.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/MyPerlTips/~3/A1jlzwinSdw/use-perl-to-create-pdf.html</link><author>noreply@blogger.com (SHEELA)</author><thr:total>1</thr:total><feedburner:origLink>http://sheela-perltips.blogspot.com/2007/08/use-perl-to-create-pdf.html</feedburner:origLink></item></channel></rss>

