Keywords BASIC, C, CPAN, Comprehensive Perl Archive Network, Larry Wall, MySQL, Oracle, PostgreSQL, SQL Server, Sybase, awk, object-oriented programming, procedural programming, sed, sh
Copyright Information
1 Introduction
Perl is short for "Perfecf extraction and reporting language". Perl is cross platform because it's an interpretive language.
You could run perl on any platform as long as you have a perl interpreter. Perl is not supported by all major
operating systems including Windows, *nix, and Macintosh.
Perl is open-source free software and it is licensed under
its artistic license , or the GPL
license. Perl was created by Larry Wall and Perl 1.0 was released to usenet's alt.comp.sources in 1987.
2 Why is perl so popular
First and most importantly, Perl is an excellent programming language combining all the good stuff
from C , awk , sed , sh , and BASIC .
In its early years, tt made the life of unix system administrators a lot easier.
Later on, with the Internet boom, Perl became more popular because of its powerful test information processing ability,
which makes it an excellent language for web programming.
Also, Perl supports all major databases including SQL Server , Oracle ,MySQL , PostgreSQL ,
Sybase and others.
Perl supports both procedural programming and object-oriented programming .
Perl is extensible. It can be extended by third party modules. Currently there are over 500 third party modules available from the
Comprehensive Perl Archive Network (CPAN ).
# The Perl interpreter can be embedded into other systems.
3 Can't locate object method X via package Y
check to make sure you've got the correct class name and method name
check to make sure you required or used the correct pm module
In my case, perl didnot like my class name Config, when I changed
it to ImageConfig.pm, everything went on well. I think Config must be some kind
of pre-defined class or keyword in perl.
4 Deepcloning object?
sub deep_copy {
my $this = shift;
if (not ref $this) {
$this;
} elsif (ref $this eq "ARRAY") {
[map deep_copy($_), @$this];
} elsif (ref $this eq "HASH") {
+{map { $_ => deep_copy($this->{$_}) } keys %$this};
} else { die "what type is $_?" }
}
Note that[SH] it will
break if there are recursive data pointers.
5 Unicode support
In perl 5.6.1, unicode support is " "incomplete" and "highly experimental"[SUN] . Perl 5.8 is supposed to have proper unicode support [PC]
6 How do I call static methods in a package?
Use PackageA::PackageB::MethodName() instead of PackageA::PackageB->MethodName()
7 How do I configure Perl CPAN to use my proxy settings (especially on windows)
cpan> o conf http_proxy http://proxy.xxx.com:3128
http_proxy http://proxy.xxx.com:3128
Please use 'o conf commit' to make the config permanent!
cpan> o conf ftp_proxy http://proxy.xxx.com:3128
ftp_proxy http://proxy.xxx.com:3128
Please use 'o conf commit' to make the config permanent!
cpan> o conf commit
commit: wrote 'C:\Perl\lib/CPAN/Config.pm'
References [PC] http://www.perl.com/pub/a/2003/01/16/whatsnew.html [SH] http://www.stonehenge.com/merlyn/UnixReview/col30.html [SUN] http://developers.sun.com/dev/gadc/unicode/perl/perl561.html
Pathologically Eclectic Rubbish Lister (slang)
(search time: 0.964 msec)
Perla town, Arkansas:
Check out what google has to say about
Perla town, Arkansas
Total households 56, total housing units: 67
Land area: 0.638832 square miles, water area 0.000000 miles
Latitude: NORTH 34.364535, longitude: EAST -92.77877
MAP
Population:115, male 54 female 61
Races in Perla town, Arkansas:
Black (63.48%) White/Non-Hispanic (36.52%):
Perley, Minnesota:
Check out what google has to say about Perley, Minnesota
Total households 53, total housing units: 61
Land area: 0.241336 square miles, water area 0.000000 miles
Latitude: NORTH 47.177044, longitude: EAST -96.80298
MAP
Population:121, male 61 female 60
Races in Perley, Minnesota:
White/Non-Hispanic (87.60%):
San Perlita, Texas:
Check out what google has to say about San Perlita, Texas
Total households 169, total housing units: 188
Land area: 0.507848 square miles, water area 0.000000 miles
Latitude: NORTH 26.500515, longitude: EAST -97.64322
MAP
Population:680, male 330 female 350
Races in San Perlita, Texas:
Hispanic (88.53%) White/Non-Hispanic (9.56%) Black (2.21%):
(search time: -329.199 msec)