Perl Programming
In that topic one should find help and samples about perl programming.
Online resources
Perl documentation
- To get the documentation about a perl function use:
perldoc -f <function>
Samples & Examples
- Set to upper-case the first later of a string:
my $dummy="lala";
$dummy=~s/(^\w)/uc($1)/e;
#$dummy[0]=uc($dummy[0]);
print "$dummy"; #Will be "Lala"
Using CPAN
perl -MCPAN -e 'shell'
- Install module from the CPAN shell:
install <module-name>
q
CPAN Configuration
On a Debian machine the CPAN configuration is stored in:
/etc/perl/CPAN/Config.pm
Installing packages on MS Windows
Automatically
Use
ActivePerl Perl Package Manager
PPM and do:
install <package-name>
Manually
From the package directory:
perl Makefile.pl
nmake
nmake install
Installing Tk::CodeText package on MS Windows with ActivePerl? 5.6.0.631
That specific version of Perl is the one recomended by Symbian for using their tool chain. That's the reason why I tend to stick to that Perl version. However on my personal machine have been using 5.6.0.638 and it seems to behave well with the Symbian tool chain. Anyway in both cases 631 and 638 I could not get
PPM to install Tk::CodeText for me thus this article.
- Install Syntax::Highlight::Perl by typing
install Syntax-Highlight-Perl from the PPM.
- Check for the latest binaries on the CPAN page or download Tk::CodeText v0.3.4 binaries.
- Unzip the binaries.
- From the binaries directory run the commands specified above.
Perl packages
Here is some information about Perl packages have been using.
Crypt::SSLeay for Windows HTTPS support.
Symbian Perl
Perl development
Object oriented Perl
How-to check if a perl module is installed
Just run:
perl -le 'use MyModuleName';
If you don't get any error it means that perl module is installed on your machine.
Related topics
BookmarksHome