I've been given a project which requires writing scripts that need to
be run on over 3000 servers. Only about 15% of them have python
installed on them. While all/most of them will have perl.
I'll try and do as much as possible in pexpect but am sure I'll have do
some significant perl. Any suggestions on what is the best way to get
upto speed on perl? 8 2122
"vj" <vi******@gmail .com> writes: I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl.
I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl?
Writing to c.l.perl is a good start...
Perl has very good docs. IMHO, they're better than Python's, specially for
the examples.
Also, starting with a book like "Learning Perl" is not bad and it might save
you a lot of time with the basics and the semantics of the language.
c.l.perl is very receptive and helpful.
--
Jorge Godoy <go***@ieee.org >
"Quidquid latine dictum sit, altum sonatur."
- Qualquer coisa dita em latim soa profundo.
- Anything said in Latin sounds smart.
vj wrote: I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl.
I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl?
There's lots of resources on the web, like http://llama.med.harvard.edu/~fgibbo...hrasebook.html http://perl.active-venture.com/Porti...n-gotchas.html
Maybe get 1 or 2 books, recommended:
Perl Debugged (scott/wright)
Effective Perl (Hall/ Schwartz)
Debugging Perl (brown)
o-o perl books (really well-written but I'm not going to represent that
these books are easy to read),
O-O Perl (Conway)
Learnign Perl O-O (Randall schwartz)
Tell 'them' you need a uniform installation of your scipting language
across all servers to ensure correct operation of your script then
ensure its python that gets loaded ;-)
I took a course in perl from Well House Consultants in the UK, which
was good; then had an immediate use for perl, which helped me remember.
I used the Well House manual and the Camel book for reference.
( http://www.wellho.net/ - Tell Graham Paddy sent you).
P.S. I don't have any connection to Well House, apart from learning
Perl through them.
- Paddy.
The online docs are very good. Just run "perldoc perl", and then go
through the various tutorial pages (starting with "perldoc perlintro").
You can also read them online here: http://perldoc.perl.org/perl.html .
Then go to http://www.perlmonks.org . They have many tutorial-style
articles there, as well as a very helpful and knowledgeable community.
If you absolutely need to write object-oriented Perl, you probably want
to keep things as simple as possible and just use regular old
hash-based objects. Writing OO Perl code is a whole nuther ball of wax
than just writing procedural Perl code.
vj wrote: I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl.
I used to work for a company with hundreds of development workstations
and build/test servers, different operating systems (add to the mixture
regular disk failures and regular hiring of new people). Everything was
controlled by pretty big perl scripts and people who maintained all the
tools found that using perl from distributions was a hassle because of
differences between perl versions and the need to install it if OS
doesn't have it. So they just built several (for different
OSes/archetectures) relocatable distributions of perl and put them on a
network drive. That turned out to be more reliable and more easy to
maintain.
You can do the same with python.
I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl?
Forget about perl :)
Hello vj I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl?
Perl is (imho) much more complex and
somehow more powerful than Python
(if you can handle it) - it has more
development iterations behind it plus
a large contibuting community - and
their bear's den (CPAN) -- which
will probably save your project some-
times from debris falling around you.
BUT! There is no problem in using
a subset of Perl (called Baby-Perl)
that allows you translating your
Perl Scripts to Python by omitting $$
and { }, replace 'sub' by 'def'
(plus some minor modifications).
There is a nice "comparison " on Python
and Perl available on the Web, which gave
me a good laugh for more than 30 seconds ;-)) http://www.adequacy.org/stories/2001...165434.32.html
(too bad - most responders didn't get the point of it)
Regards,
M.
vj wrote: I've been given a project which requires writing scripts that need to be run on over 3000 servers. Only about 15% of them have python installed on them. While all/most of them will have perl.
I'll try and do as much as possible in pexpect but am sure I'll have do some significant perl. Any suggestions on what is the best way to get upto speed on perl?
The thing that really bit me when I tried to go back to Perl after
years with Python was dereferencing. Completely obvious things in
Python, such as extracting an element from a list inside a dict in
another list felt like black magic. I actually gave up, but later I
realized that there is an entire chapter in Programming Perl about
the stumbling blocks with dereferencing in Perl.
I don't think people in this group :) will disagree if I claim that
Python software is much more maintainable and easier to develop and
debug than Perl scripts. That's probably relevant if they are to
run on thousands of servers.
I'd make a real effort to investigate if it's possible to either
install Python on all boxes or use something like cx_Freeze to make
executables out of the scripts.
Magnus Lycka <ly***@carmen.s e> wrote: The thing that really bit me when I tried to go back to Perl after years with Python was dereferencing. Completely obvious things in Python, such as extracting an element from a list inside a dict in another list felt like black magic.
Not that long ago I had to make some enhancements to someone else's
Perl script which was handling that kind of data structure. I
stared and stared at a particularly long and messy dereference, and
eventually figured out what it was doing. I then wrote what the
equivalent Python would have been. Even forgiving the Perl's initial
"my", thanks to the line noise characters the Python was over 10%
shorter, as well as more readable. So much for the myth of verbosity.
--
\S -- si***@chiark.gr eenend.org.uk -- http://www.chaos.org.uk/~sion/
___ | "Frankly I have no feelings towards penguins one way or the other"
\X/ | -- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brandon J. Van Every |
last post by:
What's better about Ruby than Python? I'm sure there's something. What is
it?
This is not a troll. I'm language shopping and I want people's answers. I
don't know beans about Ruby or have any preconceived ideas about it. I have
noticed, however, that every programmer I talk to who's aware of Python is
also talking about Ruby. So it seems that Ruby has the potential to compete
with and displace Python. I'm curious on what basis it...
|
by: Stephen C. Waterbury |
last post by:
This seems like it ought to work, according to the
description of reduce(), but it doesn't. Is this
a bug, or am I missing something?
Python 2.3.2 (#1, Oct 20 2003, 01:04:35)
on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> d1 = {'a':1}
>>> d2 = {'b':2}
>>> d3 = {'c':3}
|
by: surfunbear |
last post by:
I've read some posts on Perl versus Python and studied a bit of my
Python book.
I'm a software engineer, familiar with C++ objected oriented
development, but have been using Perl because it is great for pattern
matching, text processing, and automated testing. Our company is really
fixated on risk managnemt and the only way I can do enough testing
without working overtime (which some people have ended up doing) is by
automating my...
|
by: Philippe C. Martin |
last post by:
I apologize in advance for launching this post but I might get enlightment
somehow (PS: I am _very_ agnostic ;-).
- 1) I do not consider my intelligence/education above average
- 2) I am very pragmatic
- 3) I usually move forward when I get the gut feeling I am correct
- 4) Most likely because of 1), I usually do not manage to fully explain 3)
when it comes true.
- 5) I have developed for many years (>18) in many different environments,...
|
by: ross |
last post by:
I want to do some tricky text file manipulation on many files, but have
only a little programming knowledge.
What are the ideal languages for the following examples?
1. Starting from a certain folder, look in the subfolders for all
filenames matching *FOOD*.txt Any files matching in each folder should
be copied to a new subfolder within the current folder called EATING
with a new name of *FOOD*COPY.txt
| |
by: gamaron |
last post by:
Summary
---------
I'm looking for a C++ IDE. If I'm going to learn something, I prefer it
to be free-of-charge (preferably and open-source base), extensible (read:
language independent, plug-in capable, etc), and platform independent. A
broad community of support would be nice, too.
|
by: N.Davis |
last post by:
I am very new to Python, but have done plenty of development in C++ and
Java.
One thing I find weird about python is the idea of a module. Why is this
needed when there are already the ideas of class, file, and package?
To my mind, although one CAN put many classes in a file, it is better to
put one class per file, for readability and maintainability.
One can then create packages and libraries, using groups of files, one
|
by: john_sips_tea |
last post by:
Just tried Ruby over the past two days. I won't bore you
with the reasons I didn't like it, however one thing really
struck me about it that I think we (the Python community)
can learn from.
Ruby has ... an issue with docs. That is to say, there are
almost none. Well, actually, there are some. For example,
the "PickAxe" book (google it), and "Why's" Poignant Guide.
But there's a disturbing lack of *built-in* docs for Ruby.
Now, the...
|
by: K.J.Williams |
last post by:
Hello,
A friend and I want to learn PHP but we have two totally different
programming backgrounds.
I have experience with procedural programming in C, and he has
experience with Visual BASIC.
Well we wanted to know, what type of learning curve ( of difficulty )
we would have trying to learn PHP?
Also, What will be the most significant changes for us to adapt to? I
wanted to know if PHP is like
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |