in reply to Re: Acquiring Perl/DB2 skills
in thread Acquiring Perl/DB2 skills

But the "superficial similarities" will certainly help OP to write his first Perl program. I think OP needs a bit of assurance and encouragement at this stage. It's not that important for technical correctness yet.

Replies are listed 'Best First'.
Re: Acquiring Perl/DB2 skills
by jonadab (Parson) on Jan 15, 2004 at 17:48 UTC
    But the "superficial similarities" will certainly help OP to write his first Perl program.

    Perhaps, but...

    I think OP needs a bit of assurance and encouragement at this stage.

    Sure, and responses like "Go for it, Perl isn't that hard to learn" are fine, but...

    It's not that important for technical correctness yet.

    Glossing over details is one thing; outright lying about a critical point is something else. If you lead the guy to believe that Perl works mostly like C, you're not doing him any favours. Next week he'll try something like the following:

    print ($someval + $otherval), " blah blah blah";

    He'll be thinking that the above is a statement, because something like that in C would be a statement. Perl, of course, doesn't *have* statements, or anything that resembles them very closely, so the above parses as a list in void context, which is altogether a different thing (and an unfamiliar thing previously, since C doesn't have lists or context). It's not a hard thing, but it's very different from a statement, and the results are different.

    Perl isn't hard to learn, but the very first thing a C programmer needs to learn about it is that it's fundamentally unlike C in a handful of very important ways. You're not helping him learn it if you tell him exactly the opposite.

    Fortunately, warnings will catch most of the worst gotchas like the above, but then again a lot of C programmers seem to be used to totally ignoring all compiler warnings (judging by the stuff that scrolls by when you compile most popular software), so at minimum he needs to know to be alert for these things.


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