08-09-2019
I'm not a great perl hacker either. It was my first Scripting Language after bash in Linux ~20 years ago. The syntax is uncomfortable to me. It's quite fast. It's a usable general purpose scripting language, that scales a lot beyond shell scripting. I hadn't been using it for real work for a long time now.
I would not say it is a must learn. It has some unique points in it's purpose of using. So I will probably use it, if those points matter.
- great stability of syntax (stick to version ~5.00x if you like to have that)
- great availability(still available in the newest systems)
Some people still use it for current code(e. g. Proxmox, great open source virtualization management solution and mail filtering solution).
If you like to generate good code, you may do in perl too(or even the opposite - if you like).
The version number rised considerably in the last years and wikipedia mentions that features of the not-really-used perl 6 are being integrated zu perl 5 step by step. Maybe those features are worth a look?
Perl 5 version history - Wikipedia
Its Anti-Hype atmosphere appears kind of cool to me.
Last edited by stomp; 08-09-2019 at 07:26 PM..
This User Gave Thanks to stomp For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Can anyone tell me if the copy command in PERL has the same functionality as in KSH shell in UNIX or does it actually move the file ??
$cp_stat=system("cp $ENV{OLAMEBSDIR}/data/olam.ddabal$type $ENV{OLAMDIR}/balance/data/olam.ddabal$type.$HeaderDate"); (1 Reply)
Discussion started by: frank
1 Replies
2. Shell Programming and Scripting
Could someone tell me what is wrong with these PERL statements
it is always setting the $status2 to the number inside of the brackets......why????????
if (/^Status:/)
{
$stat = $Fld;
print "\$stat is $stat\n";
}
the above is where i'm searching for a string... (1 Reply)
Discussion started by: frank
1 Replies
3. Shell Programming and Scripting
Where can i find solid information about programming in Perl?
Thank you in advance!!!:) (5 Replies)
Discussion started by: SolidSnake
5 Replies
4. Shell Programming and Scripting
When i run my perl/tk script, a perl window pops up behind the GUI window,, can this be hidden????
Also, can the Icon be changed, the Tk icon in every window??? (1 Reply)
Discussion started by: perleo
1 Replies
5. Shell Programming and Scripting
If I use 2 system commands in a script, will one finish before the next one starts? or will it start the first and the second at the same time?
i.e.
system("ps | grep rminer");
system("ls -al | grep 431"); (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
6. Shell Programming and Scripting
Hi everyone
I am not even a novice at Perl scripting .. but had to edit one the other day. The only way I can get it to run is by prefixing 'perl' before running it - ie # perl scriptname
I am running AIX.
Any ideas why i have to do that ?
Thanks! (2 Replies)
Discussion started by: serm
2 Replies
7. Shell Programming and Scripting
Playing with an until loop as follows:
my $input;
until ($input eq "quit") {
print "Please enter something:";
$input = <STDIN>;
chomp $input;
if ($input eq "dog") {
print "cat" ;
}
else {
print "Please re-enter";
}
}
Something simple like this...
I want to prompt the user to... (3 Replies)
Discussion started by: yesokay
3 Replies
8. Shell Programming and Scripting
Hi All,
I am new to perl and just want to read the text file and write back it into another file with some modification.
Here is my requirement:
input file:
USB_OTG_PATH top.usb_top.otg_top
USB_HSIC_PATH top.usb_top.hsic_top
.. (All starts with USB_)
...
START_PATH USB_OTG_PATH.interrupt... (2 Replies)
Discussion started by: surisingh
2 Replies
9. Shell Programming and Scripting
Hi All,
I am new to Perl and got a real stupid question. We are trying to install the Date:Calc package for some calculations with dates.The security guys mentioned they won't install it as root in /usr/bin/perl but have asked us to install it in any directory and use it from there.
Here's the... (2 Replies)
Discussion started by: nua7
2 Replies
10. Programming
I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open())
I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
LEARN ABOUT DEBIAN
www::wikipedia
WWW::Wikipedia(3pm) User Contributed Perl Documentation WWW::Wikipedia(3pm)
NAME
WWW::Wikipedia - Automated interface to the Wikipedia
SYNOPSIS
use WWW::Wikipedia;
my $wiki = WWW::Wikipedia->new();
## search for 'perl'
my $result = $wiki->search( 'perl' );
## if the entry has some text print it out
if ( $result->text() ) {
print $result->text();
}
## list any related items we can look up
print join( "
", $result->related() );
DESCRIPTION
WWW::Wikipedia provides an automated interface to the Wikipedia <http://www.wikipedia.org>, which is a free, collaborative, online
encyclopedia. This module allows you to search for a topic and return the resulting entry. It also gives you access to related topics which
are also available via the Wikipedia for that entry.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
METHODS
new()
The constructor. You can pass it a two letter language code, or nothing to let it default to 'en'.
## Default: English
my $wiki = WWW::Wikipedia->new();
## use the French wiki instead
my $wiki = WWW::Wikipedia->new( language => 'fr' );
WWW::Wikipedia is a subclass of LWP::UserAgent. If you would like to have more control over the user agent (control timeouts, proxies ...)
you have full access.
## set HTTP request timeout
my $wiki = WWW::Wikipedia->new();
$wiki->timeout( 2 );
You can turn off the following of wikipedia redirect directives by passing a false value to "follow_redirects".
language()
This allows you to get and set the language you want to use. Two letter language codes should be used. The default is 'en'.
my $wiki = WWW::Wikipedia->new( language => 'es' );
# Later on...
$wiki->language( 'fr' );
follow_redirects()
By default, wikipeda redirect directives are followed. Set this to false to turn that off.
search()
Which performs the search and returns a WWW::Wikipedia::Entry object which you can query further. See WWW::Wikipedia::Entry docs for more
info.
$entry = $wiki->search( 'Perl' );
print $entry->text();
If there's a problem connecting to Wikipedia, "undef" will be returned and the error message will be stored in "error()".
random()
This method fetches a random wikipedia page.
error()
This is a generic error accessor/mutator. You can retrieve any searching error messages here.
TODO
o Clean up results. Strip HTML.
o Watch the development of Special:Export XML formatting, eg: http://en.wikipedia.org/wiki/Special:Export/perl
SEE ALSO
o LWP::UserAgent
AUTHORS
Ed Summers <ehs@pobox.com>
Brian Cassidy <bricas@cpan.org>
COPYRIGHT AND LICENSE
Copyright 2003-2011 by Ed Summers
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2011-04-05 WWW::Wikipedia(3pm)