Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I think this is a huge advantage to Perl -- it's quite portable.

Absolutely. Provided you don't rely on external stuff (e.g., backtick out to system commands, use modules that are neither pure perl nor core, ...), Perl is very portable.

I do wish that I had a development environment like VB's for Perl, which would show me immediately when I commit my favorite stupid mistakes (e.g. dropping a semi-colon or using InStr instead of index, handicaps which come with using more than one system/language).

The closest thing I know to this is cperl-mode. It will, assuming you turn on syntax highlighting, show keywords like index in a special color, so you'll immediately notice if you typo them, because they won't change color like usual. It also matches grouping and quoting symbols for you; as soon as you type the closing one, the opening one flashes. (Actually, that's a feature of Emacs that works in pretty much all major modes; it is a feature Emacs *has* to have, because it's pretty hard to write good lisp without it; Emacs was developed by lisp programmers originally.) As far as dropping a semicolon, you'll notice when you go to the next line and it indents wrong. Configurable automatic indentation is cool. cperl-mode is in general cool. The only downside to it is that it runs in Emacs, which means you have to learn to use Emacs. Now, Emacs is wonderful in itself and well worth learning, but it's not exactly something you're going to pick up and start using in one afternoon. In fact, you can expect to spend just as much time learning Emacs as you spent learning Perl.

And yes, I still type 'ls' in the Windows command prompt, and 'dir' on FreeBSD...

You think you've got it bad... I keep getting mixed up between Ctrl-C (DOS, Windows, and *nix), Ctrl-Y (VMS), and C-g (Emacs). Then every once in a while I get stuck working with a pre-X Mac and have to try to remember what the keystroke is for Force Quit; I usually just end up holding down *all* the buckies and start hitting keys. Then there's copy and paste: on Windows it's Ctrl-C/Ctrl-V; under *nix, half the apps do it the Windows way and the other half do it the other way; on Mac it's clover-c and clover-v, and then there's Emacs, where I've got it bound to something yet different. (One of these days I'm going to get tired of messing around and totally transplant the entire Ctrl-C and Ctrl-X prefix keys in Emacs and their whole associated keymaps to different prefix keys, pervasively enforcing the transplant via hooks in all major modes so I can make copy and paste work the way I really want...)

(Although I still love C, I would probably learn Perl if I were just starting out today.)

I would recommend that newbies (here I mean newbies to programming in general, not just to Perl) learn higher-level languages such as Perl first, later getting into lower-level languages such as C only if they have the aptitude and desire for it. Perl is not the only suitably highlevel language, but it's a good choice. If you are worried that the C programmers will look down their nose at you for only knowing a "scripting language" (a quite silly thing to look down their nose at you for, but some people are indeed quite silly), then learn lisp or one of its derivitives; they're not on as high a level as Perl or Python, but they're *way* higher-level than C, support more paradigms better (doing functional programming in C is a fairly unnatural act), and (except for elisp) cannot be reasonably accused of being "a scripting language". (As an added bonus, if you learn common lisp, you get to patronise the C programmers, call them "whippersnappers", and tell them your language was being used for artificial intelligence research when their language's grandmother (BCL or whatever it was called) was in diapers. This doesn't make them happy, but it shuts them up.) But if you're not worried about the opinion of the C programmers, go ahead and delve right in to Perl. Previous experience in other languages does make learning Perl faster if you happen to have it, but not enough to justify going and learning the other languages first if you haven't already, particularly considering that it goes both ways: knowledge of Perl will make it easier to learn the other languages, too. IMO, Perl is a great choice for a first language.


$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

In reply to Re: OT: Switching Sides by jonadab
in thread OT: Switching Sides by Khansultant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 11:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found