In search of Perl tutorials.

Discussion in 'Perl Misc' started by MasterSheep, Aug 23, 2005.

  1. MasterSheep

    MasterSheep Guest

    Hey guys! I'll try not to sound like to much of a total n00b here...
    I'm pretty new to Perl, and I'd like to know of the best tutorial site
    out there. Ideally, I need a course that's designed for someone who's
    new to Perl, but is a relatively experienced programmer.

    Hope to become a more active group member soon!
     
    MasterSheep, Aug 23, 2005
    #1
    1. Advertising

  2. Gunnar Hjalmarsson, Aug 23, 2005
    #2
    1. Advertising

  3. MasterSheep

    John Bokma Guest

    "MasterSheep" <> wrote:

    > Hey guys! I'll try not to sound like to much of a total n00b here...
    > I'm pretty new to Perl, and I'd like to know of the best tutorial site
    > out there.


    I would recommend to buy a good book [1], and leave the computer for what
    it is until you have read it at least twice.

    My experience is that people who learn a language with a book on their lap
    behind the computer make after 5 years still mistakes they shouldn't have
    made when they just read the book front to back.

    As with other languages that are (or were) populair on "the net", it's easy
    to find countless bad examples and tutorials, either on line or in book
    form.

    [1] O'Reilly. If you're really experienced you might be able to start with
    Programming Perl, otherwise get Learning Perl.

    --
    John Small Perl scripts: http://johnbokma.com/perl/
    Perl programmer available: http://castleamber.com/
    Happy Customers: http://castleamber.com/testimonials.html
     
    John Bokma, Aug 24, 2005
    #3
  4. Also sprach MasterSheep:

    > Hey guys! I'll try not to sound like to much of a total n00b here...


    This is not a Quake clan so you may want to avoid language/spelling that
    pretends it is.

    > I'm pretty new to Perl, and I'd like to know of the best tutorial site
    > out there. Ideally, I need a course that's designed for someone who's
    > new to Perl, but is a relatively experienced programmer.


    I firmly believe in the documentation that ships with a Perl
    distribution and any tutorial will do that enables you to make use of
    that documentation.

    The Perl documention (known as perldoc which is also the program to
    access this documentation) contains a brief introduction to Perl. If you
    haven't yet installed perl locally, see

    <http://www.perldoc.com/perl5.8.4/pod/perlintro.html>

    If you're on a UNIX-ish system, 'perldoc perlintro' will bring up that
    document. On Windows you'd most likely be using ActivePerl which comes
    with the documentation in HTML format. ActivePerl does have the perldoc
    program as well, but with Windows lacking a decent shell you're better
    off with the HTML version.

    For a list of available perldocs, see 'perldoc perl' or the
    corresponding HTML version. Also useful:

    perldoc -f BUILT_IN # look up built-in function
    perldoc -q KEYWORD # look up KEYWORD in the FAQs

    There is no HTML-equivalent for these functionalities.

    > Hope to become a more active group member soon!


    You are also free to lurk in this group and follow the discussions
    taking place here. Many of them deal with beginner's problems. The
    advice you can find here is usually sound and accurate as many
    well-acclaimed Perl experts are among the regulars.

    Before posting to this group, make sure to read the posting guidelines:

    <http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html>

    If you don't follow its advice, regulars here might inflict serious
    damage on you. If you do follow them, you'll be fine.

    Tassilo
    --
    use bigint;
    $n=71423350343770280161397026330337371139054411854220053437565440;
    $m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
     
    Tassilo v. Parseval, Aug 24, 2005
    #4
  5. MasterSheep wrote:
    > I'll try not to sound like to much of a total n00b here...

    Oh ok, W00T. WOuld you mind cutting that leet speak thing a little <smile>?
    See the relevant entry in Jargon file, for example:

    http://www.catb.org/~esr/jargon/html/crackers.html

    Another point is that using punctuation or digits rather than long nice
    words isn't as advantageous in on-line communication as it is in Perl. Noob
    or newbie isn't that long a word but there's a lot of typing between
    $/ and $INPUT_RECORD_SEPARATOR, don't you think? Of course being Perl, you
    could have gotten away with $RS, too.

    Lastly, I should mention that as a screen reader user I prefer the use of
    readable emoticon tags or implicitly indicating the same thing rather than
    throwing non word-character smilies and AFAIK (read 'a fake'), around all
    too much. These things do come down to personal taste in the end, though.
    But back to Perl:

    > course that's designed for someone who's new to Perl, but is a relatively
    > experienced programmer.

    I don't know if it's any good and haven't seen it recommended too much but
    there's a book called Perl for C programmers. More details at Amazon's:

    http://tinyurl.com/7h2wg

    I've never thought much of tutorials, really. But when it comse to books I
    found that even if it goes through some very basics of control structures
    and such, Learning Perl (the Win32 edition) was the onlyh book that really
    demystified scalar vs list context and regular expressions to me. Another
    book you might find interesting is Larry Wall's take on the subject namely
    Programming Perl.

    i've found most of the good Perl books, including the above two, available
    on-line at:

    http://www.unix.org.ua/orelly/perl/

    What I'd like to know is if this material is actually legally available
    on-line? In search of on-line Perl things I've hit the above URL numerous
    times yet most of the free PErl or programming book sites seem to omit this
    particular site.

    --
    With kind regards Veli-Pekka Tätilä ()
    Accessibility, game music, synthesizers and programming:
    http://www.student.oulu.fi/~vtatila/
     
    Veli-Pekka Tätilä, Aug 24, 2005
    #5
  6. "Veli-Pekka Tätilä" <> writes:

    > What I'd like to know is if this material is actually legally available
    > on-line?


    The books at the URL you pointed to are nearly ten years out of date. Even if
    were legal - which they're decidedly *NOT* - they'd be useless.

    sherm--

    --
    Cocoa programming in Perl: http://camelbones.sourceforge.net
    Hire me! My resume: http://www.dot-app.org
     
    Sherm Pendley, Aug 24, 2005
    #6
  7. MasterSheep

    Ian Wilson Guest

    MasterSheep wrote:
    > Hey guys! I'll try not to sound like to much of a total n00b here...
    > I'm pretty new to Perl, and I'd like to know of the best tutorial site
    > out there. Ideally, I need a course that's designed for someone who's
    > new to Perl, but is a relatively experienced programmer.


    covered by others.

    > Hope to become a more active group member soon!
    >


    In which case, since you're posting using google groups, its important
    you read Google's guidelines thoroughly:

    http://groups.google.com/googlegroups/posting_style.html

    I hope you find that helpful.
     
    Ian Wilson, Aug 24, 2005
    #7
  8. scalar context vs. list context (was Re: In search of Perl tutorials.)

    Veli-Pekka Tätilä <> wrote:

    > Learning Perl (the Win32 edition) was the onlyh book that really
    > demystified scalar vs list context and regular expressions to me.



    The concept of scalar context vs. list context is not mystic to anyone
    who understands a natural language.

    But most folks refer to it as "singular vs. plural" in its
    non-mystical errr, context. (ie. in natural language)

    Consider:

    Give me a fish.

    Give me several fish.

    We have no problem whatsoever discerning that the first "fish" is
    singular, while the second is plural.

    How can we tell the difference?

    By looking at what is "around" the subject word.

    Q: What is another name for "what is around"?

    A: Context.

    "a" tells us that fish is singular, "several" tells us that it is plural.


    Consider:

    $x = somefunc();

    ($first, $second) = somefunc();

    How can we tell which invocation of somefunc() is in scalar context
    and which is in list context?

    By looking at what is "around" the subject function, that is, its "context".

    A scalar on the LHS tells us that the first somefunc() is singular (scalar),
    a list on the LHS tell us that it is plural (list).


    The concept of scalar vs list is not foreign to anybody.

    Why do we get all confused when we see it in a programming language
    when we can tell the difference every day in a natural language?

    (a rhetorical question)


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Aug 24, 2005
    #8
  9. MasterSheep

    Guest

    Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    Tad McClellan <> wrote:
    > Veli-Pekka Tätilä <> wrote:
    >
    > > Learning Perl (the Win32 edition) was the onlyh book that really
    > > demystified scalar vs list context and regular expressions to me.

    >
    > The concept of scalar context vs. list context is not mystic to anyone
    > who understands a natural language.
    >
    > But most folks refer to it as "singular vs. plural" in its
    > non-mystical errr, context. (ie. in natural language)
    >
    > Consider:
    >
    > Give me a fish.
    >
    > Give me several fish.
    >
    > We have no problem whatsoever discerning that the first "fish" is
    > singular, while the second is plural.


    Is there any natural language in which "Give me a several fish" means
    "tell me how many fish there are"?


    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Aug 24, 2005
    #9
  10. MasterSheep

    Paul Lalli Guest

    Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    wrote:
    > Tad McClellan <> wrote:
    > >
    > > Consider:
    > >
    > > Give me a fish.
    > >
    > > Give me several fish.
    > >
    > > We have no problem whatsoever discerning that the first "fish" is
    > > singular, while the second is plural.

    >
    > Is there any natural language in which "Give me a several fish" means
    > "tell me how many fish there are"?


    I understand what you're getting at, Xho, but I think you missed Tad's
    point. 'a' and 'several' in the above examples tell you in which
    context 'fish' is. The fact that a Perl array returns its size in
    scalar context is a detail of what happens once context has been
    determined.

    There are two separate issues now being addressed:
    1) How do we determine in which context a certain expression is being
    evaluated?
    2) What does that expression return in each context?

    I think those are two very different problem sets. Your analogy,
    therefore, doesn't quite hold.

    Just my 2¢

    Paul Lalli
     
    Paul Lalli, Aug 24, 2005
    #10
  11. Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    There are Context Free Grammars (CFGs) and Context Sensitive Grammars.

    I took a course (Computability I think it was) several years ago which
    addressed each of these concepts--great class, although it drove you
    kind of nuts. The problem is amibiguity can arise even if the context
    is there to disambiguate. The context that the words themselves provide
    is insufficient to pinpoint an exact meaning to the sentence. There is
    a greater 'meta-context', if you will, that exists, which is not
    encapsulated by the text you see in front of you. There is history,
    exposition, culture...all of these things affect the meaning.

    Consider:

    Dr. Lecter ate some rice for dinner.

    Dr. Lecter ate Clarice for dinner.

    Dr. Lecter ate some rice with Clarice for dinner.

    Does this mean Dr. Lecter is eating Clarice? Or eating WITH Clarice?
    Most grammars aren't that rigid--they're flexible, and there exist many
    exceptions to most rules. An example of flexibility can be seen with he
    placement of indirect objects; they can come before or after a direct
    object, depending on the whim or style of the author.

    I mailed him the note.
    I mailed the note to him.


    Sorry to ramble, I just thought this was an interesting topic :).




    Paul Lalli wrote:
    > wrote:
    > > Tad McClellan <> wrote:
    > > >
    > > > Consider:
    > > >
    > > > Give me a fish.
    > > >
    > > > Give me several fish.
    > > >
    > > > We have no problem whatsoever discerning that the first "fish" is
    > > > singular, while the second is plural.

    > >
    > > Is there any natural language in which "Give me a several fish" means
    > > "tell me how many fish there are"?

    >
    > I understand what you're getting at, Xho, but I think you missed Tad's
    > point. 'a' and 'several' in the above examples tell you in which
    > context 'fish' is. The fact that a Perl array returns its size in
    > scalar context is a detail of what happens once context has been
    > determined.
    >
    > There are two separate issues now being addressed:
    > 1) How do we determine in which context a certain expression is being
    > evaluated?
    > 2) What does that expression return in each context?
    >
    > I think those are two very different problem sets. Your analogy,
    > therefore, doesn't quite hold.
    >
    > Just my 2¢
    >
    > Paul Lalli
     
    it_says_BALLS_on_your forehead, Aug 24, 2005
    #11
  12. MasterSheep

    MasterSheep Guest

    Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    Thanks for all the info guys. I appreciate your eagerness to help.

    Oh and about the "n00b" thing? I probably deserved the drilling
    everyone gave me on that. Old habits are hard to break.
     
    MasterSheep, Aug 24, 2005
    #12
  13. MasterSheep

    Arne Ruhnau Guest

    OT: Ambiguity in natural languages (was Re: scalar context vs. listcontext)

    Just to clarify some things:

    it_says_BALLS_on_your forehead wrote:
    > There are Context Free Grammars (CFGs) and Context Sensitive Grammars.


    To complete the Chomsky-Hierarchy, you should add Regular Grammars and
    Unrestricted Grammars ;)

    > kind of nuts. The problem is amibiguity can arise even if the context
    > is there to disambiguate. The context that the words themselves provide
    > is insufficient to pinpoint an exact meaning to the sentence. There is
    > a greater 'meta-context', if you will, that exists, which is not
    > encapsulated by the text you see in front of you. There is history,
    > exposition, culture...all of these things affect the meaning.
    >
    > Consider:
    >
    > Dr. Lecter ate some rice for dinner.
    >
    > Dr. Lecter ate Clarice for dinner.
    >
    > Dr. Lecter ate some rice with Clarice for dinner.
    >
    > Does this mean Dr. Lecter is eating Clarice? Or eating WITH Clarice?


    <nitpick>
    The ambiguity in the last sentence results from the sentence's structure,
    not from world knowledge. The latter only helps to choose the correct
    interpretation.
    </nitpick>

    > Most grammars aren't that rigid--they're flexible, and there exist many
    > exceptions to most rules.


    <mantra>If you formalize your grammar, each exception must be due to your
    formalization.</mantra> (huh?)

    > An example of flexibility can be seen with he
    > placement of indirect objects; they can come before or after a direct
    > object, depending on the whim or style of the author.
    >
    > I mailed him the note.
    > I mailed the note to him.


    Well, no. If you wanted flexibility, you would have

    (1) I mailed him the note.
    (2) I mailed the note him.

    But (2) is ungrammatical. However, there are languages that have a rather
    relaxed word order (and some are assumed to have no restrictions on that
    level at all). E.g. in German:

    (3) Ich gab [der Verkaeuferin] [das Geld]
    (4) Ich gab [das Geld] [der Verkaeuferin]

    are both grammatically correct. This, of course, raises the question of why
    such variations on double-object constructions are illegal in English, but
    not in German...

    But now for some lexical ambiguity:

    (5) Peter served the fish.
    (6) Peter served the visitors.

    If you know that Peter works as a cook for a group of cannibals, serve in
    (6) can have the same meaning as in (5). Nothing except discourse
    context/world knowledge can help you here...

    Arne Ruhnau
     
    Arne Ruhnau, Aug 24, 2005
    #13
  14. Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    it_says_BALLS_on_your forehead <> wrote:
    > There are Context Free Grammars (CFGs) and Context Sensitive Grammars.
    >
    > I took a course (Computability I think it was) several years ago which
    > addressed each of these concepts--great class, although it drove you
    > kind of nuts.



    They called it "Formal Methods" at my college (more than several years ago).


    > The problem is amibiguity can arise even if the context
    > is there to disambiguate. The context that the words themselves provide
    > is insufficient to pinpoint an exact meaning to the sentence. There is
    > a greater 'meta-context', if you will, that exists, which is not
    > encapsulated by the text you see in front of you. There is history,
    > exposition, culture...all of these things affect the meaning.
    >
    > Consider:



    I saw an example 15 minutes ago in a TV advertisement:

    Chrysler cars are projected to have higher resale value
    than Ford or GM.

    And everyone who is "normal" is fine with it, but I'm wondering
    which one they beat. Shouldn't it be

    ... than Ford _and_ GM

    ??

    They could have a _lower_ resale than Ford or GM, and their
    statement would still be true. Having an engineer-nature can
    become annoying at times...

    Is there "precedence" or "grouping" in natural language?


    > Sorry to ramble,



    Rambling is OK.

    (top-posting is not OK though, please don't do that)


    > I just thought this was an interesting topic :).



    Me too.



    [snip TOFU]

    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Aug 25, 2005
    #14
  15. Re: OT: Ambiguity in natural languages (was Re: scalar context vs. list context)

    Also sprach Arne Ruhnau:

    >> An example of flexibility can be seen with he
    >> placement of indirect objects; they can come before or after a direct
    >> object, depending on the whim or style of the author.
    >>
    >> I mailed him the note.
    >> I mailed the note to him.

    >
    > Well, no. If you wanted flexibility, you would have
    >
    > (1) I mailed him the note.
    > (2) I mailed the note him.
    >
    > But (2) is ungrammatical. However, there are languages that have a rather
    > relaxed word order (and some are assumed to have no restrictions on that
    > level at all). E.g. in German:
    >
    > (3) Ich gab [der Verkaeuferin] [das Geld]
    > (4) Ich gab [das Geld] [der Verkaeuferin]
    >
    > are both grammatically correct. This, of course, raises the question of why
    > such variations on double-object constructions are illegal in English, but
    > not in German...


    In general, the more complex the grammar of a language is, the looser
    its syntax can be. What you call double-object constructions is referred
    to as valence. The valence of a verb determines how many components it
    requires. The verb 'to give' requires at least two of them: The subject
    (being the giver) and a direct object (what is given). A third optional
    one exists, often referred to as indirect object: to whom it was given.

    In German each of these three components requires a different casus and
    they can (usually) be distinguished by their flexion. Subject is
    nominative ('ich'), direct object accusative ('das Geld'; incidentally,
    accusative and nomative are the same for words with feminine and neutral
    gender, but they differ for masculine words) and finally dative for the
    indirect object ('der Verkaeuferin'; dative and genetive being the same
    for feminine words).

    English conceptually has these casus, too, but English nouns don't have
    flexion (except for the plural) so if you allow any order for the
    subject and the two objects, the role of each of the words might no
    longer be clear.

    But note that for your examples (3) and (4), English also has a way to
    express those two variants:

    I gave the saleswoman the money.
    I gave the money to the saleswoman.

    So the lack of flexion is compensated by explicitely using a
    preposition. Prepositions are most commonly referred to as words that
    set nouns into a chronological or geographical relation to each other.
    But what they really do is put them into a grammatical relation. That's
    why a preposition always requires a casus (even if its mostly invisible
    in English).

    German allows even some sort of casus-overloading for prepositions. The
    movie 'One flew over the cuckoo's nest' is 'Einer flog über das
    Kuckucksnest' in German ('über' + accusative). We could also say

    Einer flog über dem Kuckucksnest

    ('über' + dative) which means something entirely else: One was flying
    over the cuckoo's nest, meaning he was sort of hovering over it without
    moving.

    Note however that there are or were languages with much higher
    flexibility in word ordering: Latin comes to mind. Words could have
    virtually any order in Latin sentences because Latin's grammar has five
    instead of four casus (not counting the vocative) and a less ambiguous
    flexion.

    > But now for some lexical ambiguity:
    >
    > (5) Peter served the fish.
    > (6) Peter served the visitors.
    >
    > If you know that Peter works as a cook for a group of cannibals, serve in
    > (6) can have the same meaning as in (5). Nothing except discourse
    > context/world knowledge can help you here...


    This is ambiguous in English but it wouldn't be in Latin or in German.
    Both would indicate the role of the object by employing the appropriate
    casus: accusative for the fish and dative for the visitors.

    The above has unfortunately nothing to do with Perl's TIMTOWTDY as
    someone would be tempted to assume. All the above cases were dealing
    with syntactical TIMTOWTDY. But in Perl it is mostly a semantical
    TIMTOWTDY.

    Tassilo
    --
    use bigint;
    $n=71423350343770280161397026330337371139054411854220053437565440;
    $m=-8,;;$_=$n&(0xff)<<$m,,$_>>=$m,,print+chr,,while(($m+=8)<=200);
     
    Tassilo v. Parseval, Aug 25, 2005
    #15
  16. Re: In search of Perl tutorials (apology).

    Bernard El-Hagin wrote:
    > Of course it isn't! You lecture people on using <smile> vs :) and in
    > the same post you link to *obviously* illegal material. What the hell?!


    OK sorry, honest. I wouldn't thought I would be flamed this badly, hehe.
    Mind you I'm not hosting the books or anything merely pointing out that they
    exist on-line and are very easy to find there, too, even using Google. I
    wonder why the site hasn't been shot down ages ago, then.

    Besides, I do know O'Reilly does have an Open Book project and many author's
    like to distribute books on-line these days, which is a good thing. Bruce
    Eckel and a number of commonly available Perl books, though not the once I
    linked to, come to mind first.

    Maybe someone will find:

    http://www.freeprogrammingresources.com/perlbook.html

    and also

    http://learn.perl.org/library/beginning_perl/

    a good start.

    These books should at least be totally legally on-line and pretty good, too.

    --
    With kind regards Veli-Pekka Tätilä ()
    Accessibility, game music, synthesizers and programming:
    http://www.student.oulu.fi/~vtatila/
     
    Veli-Pekka Tätilä, Aug 25, 2005
    #16
  17. MasterSheep

    Arne Ruhnau Guest

    Re: OT: Ambiguity in natural languages (was Re: scalar context vs.list context)

    Tassilo v. Parseval wrote:
    > Also sprach Arne Ruhnau:
    >
    >
    >>>An example of flexibility can be seen with he
    >>>placement of indirect objects; they can come before or after a direct
    >>>object, depending on the whim or style of the author.
    >>>
    >>>I mailed him the note.
    >>>I mailed the note to him.

    >>
    >>Well, no. If you wanted flexibility, you would have
    >>
    >>(1) I mailed him the note.
    >>(2) I mailed the note him.
    >>
    >>But (2) is ungrammatical. However, there are languages that have a rather
    >>relaxed word order (and some are assumed to have no restrictions on that
    >>level at all). E.g. in German:
    >>
    >>(3) Ich gab [der Verkaeuferin] [das Geld]
    >>(4) Ich gab [das Geld] [der Verkaeuferin]
    >>
    >>are both grammatically correct. This, of course, raises the question of why
    >>such variations on double-object constructions are illegal in English, but
    >>not in German...

    >

    <snip valence>
    > In German each of these three components requires a different casus and
    > they can (usually) be distinguished by their flexion. Subject is
    > nominative ('ich'), direct object accusative ('das Geld'; incidentally,
    > accusative and nomative are the same for words with feminine and neutral
    > gender, but they differ for masculine words) and finally dative for the
    > indirect object ('der Verkaeuferin'; dative and genetive being the same
    > for feminine words).
    >
    > English conceptually has these casus, too, but English nouns don't have
    > flexion (except for the plural) so if you allow any order for the
    > subject and the two objects, the role of each of the words might no
    > longer be clear.
    >
    > But note that for your examples (3) and (4), English also has a way to
    > express those two variants:
    >
    > I gave the saleswoman the money.
    > I gave the money to the saleswoman.
    >
    > So the lack of flexion is compensated by explicitely using a
    > preposition.


    I disagree, sort of. If the lack of case morphology would be compensated by
    use of prepositions, we would have

    I gave to the saleswoman the money

    because nothing about the valence information of give has changed. If this
    was all about subcategorisation, the preposition would be used in both
    cases. But it is not. The only thing that changes is the order of give's
    complements, and if the indirect object is second, its case must be overtly
    marked by a preposition. Note that although we now have a prepositional
    phrase instead of a noun phrase, it still has complement status:

    *I gave the money (though this can be legal in some contexts)

    We can handle this problem by a) postulating two different lexical entries
    for 'give' (or maybe, one entry and one rule covering more than just
    'give'), or b) by relating the structure of one sentence to the structure
    of the other sentence through some derivational operation, or c) ... maybe
    something else. Larson(1988) even assumes an analogy to passive...

    > Prepositions are most commonly referred to as words that
    > set nouns into a chronological or geographical relation to each other.
    > But what they really do is put them into a grammatical relation. That's
    > why a preposition always requires a casus (even if its mostly invisible
    > in English).


    Both is true. There is a distinction between at least two types of
    prepositions: those called "argument marking" (grammatical relations),
    which are obligatory:

    I laughed at the man

    , and those which "merely" carry lexical information and introduce adjuncts
    instead of complements:

    I laughed at the man with the gun

    However, I always find the criteria for distinguishing them at least fuzzy,
    if not rather weak.

    > German allows even some sort of casus-overloading for prepositions. The
    > movie 'One flew over the cuckoo's nest' is 'Einer flog über das
    > Kuckucksnest' in German ('über' + accusative). We could also say
    >
    > Einer flog über dem Kuckucksnest
    >
    > ('über' + dative) which means something entirely else: One was flying
    > over the cuckoo's nest, meaning he was sort of hovering over it without
    > moving.


    It's the alternation between directionality(acc) and locality(dat).

    >>But now for some lexical ambiguity:
    >>
    >>(5) Peter served the fish.
    >>(6) Peter served the visitors.
    >>
    >>If you know that Peter works as a cook for a group of cannibals, serve in
    >>(6) can have the same meaning as in (5). Nothing except discourse
    >>context/world knowledge can help you here...

    >
    >
    > This is ambiguous in English but it wouldn't be in Latin or in German.
    > Both would indicate the role of the object by employing the appropriate
    > casus: accusative for the fish and dative for the visitors.


    Well, lexical ambiguities do not arise because of case but because of the
    German lexicon ;)

    Peter bediente die Gäste[akk]
    Peter servierte die Gäste[akk]

    For some exotic language and its argument marking, consider Maori:
    There is no subject-verb agreement. Case is handled via prepositions (or
    lack of).
    Subjects lack a preposition
    Indirect objects are mostly introduced with 'ki'
    Direct objects are mostly introduced with 'i'

    However, there is a certain construction (actor-emphatic) in which the
    semantic subject gets fronted, and the direct object becomes the
    syntactical subject (thus lacking a preposition...). Weird.

    Err. This is all too unperlish, therefore:

    > The above has unfortunately nothing to do with Perl's TIMTOWTDY as
    > someone would be tempted to assume. All the above cases were dealing
    > with syntactical TIMTOWTDY. But in Perl it is mostly a semantical
    > TIMTOWTDY.


    y/Y/I; # scnr

    Arne Ruhnau

    Larson, R.K. (1988): On the Double Object Construction. In: Linguistic
    Inquiry 19, 335-391.
     
    Arne Ruhnau, Aug 25, 2005
    #17
  18. Re: Semi OT: Perl Books: Accessibility and Copyright

    Sherm Pendley wrote:
    > The books at the URL you pointed to are nearly ten years out of date.
    > Even if were legal - which they're decidedly *NOT* - they'd be useless.


    Agreed on the legality, and appologies for posting the link in the first
    place, but I wouldn't say these older Perl books are useless. Unlike PHP
    Perl hasn't changed an awful lot from 5.0 as a whole and I found Learning
    Perl for Win32 a very valuable resource, even if a little out of date.

    Another way to look at this is that I'm also a low-vision screen reader
    user. Should I want to get a physical book from say Amazon, it does not come
    in a format in which I could read it conveniently. I do have a bit of usable
    sight left, for details check:

    http://www.student.oulu.fi/~vtatila/sight.html

    and could use what they call a video magnifier, but even so accessing the
    book is very slow and inconvenient. The only practical solution is scanning
    in every page of the book, hoping that Omni Page won't crash every 50 pages,
    and then converting the contents in a text file that's screen reader
    accessible with speech.

    Even so, errors in source code are annoyingly common as are partly missing
    words and other related nasties. Still I've been using this tac succesfully
    for books that are not easily found on-line or which I want to support in
    particular and that are locally available here. I read the latest harry
    Potter book this way spending a week-end to get it scanned in properly, to
    start reading it as soon as possible.

    Sure I would like to purchase e-book versions of many programming and
    fiction books but the trouble is they are not too common these days. And
    often formats tend to be something highly annoying or inaccessible such as
    PDF (ADobe's MSAA implementation is sluggish) or LIT (no screen reader can
    access that so it's self-voicing).

    I think there's a clause in the Finnish copyright law that grants special
    rights for certain organizations such as The Finnish library for the
    visually impaired. They are allowed to make copies of copyrighted material
    to sight-impaired people provided that this material isn't easily accessible
    otherwise. In fact they do this totally legally but techy books about
    programming, let alone English, just aren't exactly top priority - no books
    about Perl. user's are also legally allowed to scan in books and share them
    to other VI people in the spirit of the bookshare project:

    http://www.bookshare.org/web/Welcome.html

    I would gladly be part of Bookshare, too, but I don't live in the States so
    that's a no can do.

    So suppose I have a choice between a free on-line book, whose author I'd
    like to support, or getting the same thing in Amazon and having to spend
    days manually scanning it in. It is far too easy to choose the first option
    because it is so much more practical and I don't even feel ethically that
    bad about it (not sure about legality in this case, even if sight-impaired).
    Of course it's a different matter for the sighted but I'd like to stress I'm
    not the kind of person who collects all books on a given subject just
    because I can, and I don't upload illegal e-books.

    Finally, I asked and the Finnish library for the visually impaired doesn't
    have resources to make accessible books that are not strictly part of my
    studies but that are related and interesting. You guessed it books about
    Perl, and Tanenbaum's book about Minix, for instance.

    --
    With kind regards Veli-Pekka Tätilä ()
    Accessibility, game music, synthesizers and programming:
    http://www.student.oulu.fi/~vtatila/
     
    Veli-Pekka Tätilä, Aug 25, 2005
    #18
  19. Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    Tad McClellan wrote:
    > Veli-Pekka Tätilä <> wrote:
    >> Learning Perl (the Win32 edition) was the onlyh book that really
    >> demystified scalar vs list context and regular expressions to me.

    > The concept of scalar context vs. list context is not mystic to anyone
    > who understands a natural language.

    Well an if statement shouldn't be either, yet even that one can cause some
    head-aches if you are programming ffor the first time. Sure the concept of
    one vs many is familiar it is just that you don't see it very much in other
    programming languages. At least not in a Perlish way in C or Java both of
    which are languages I knew before Perl. To be more accurate I should have
    said that the tutorials I tried reading before getting a real Perl book were
    not as clear on the subject. Or explained it in some manner that just didn't
    click with my thinking.

    --
    With kind regards Veli-Pekka Tätilä ()
    Accessibility, game music, synthesizers and programming:
    http://www.student.oulu.fi/~vtatila/
     
    Veli-Pekka Tätilä, Aug 25, 2005
    #19
  20. Re: scalar context vs. list context (was Re: In search of Perl tutorials.)

    Tad McClellan <> wrote in
    news::

    > I saw an example 15 minutes ago in a TV advertisement:
    >
    > Chrysler cars are projected to have higher resale value
    > than Ford or GM.
    >
    > And everyone who is "normal" is fine with it, but I'm wondering
    > which one they beat. Shouldn't it be
    >
    > ... than Ford _and_ GM
    >
    > ??
    >
    > They could have a _lower_ resale than Ford or GM, and their
    > statement would still be true. Having an engineer-nature can
    > become annoying at times...


    That ad has been driving me nuts (being an economist is not any easier):
    If Chrysler cars will indeed have a higher resale value, they should
    fetch a higher price today.

    Sinan
    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Aug 25, 2005
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kenneth Porter

    Tutorials/examples for SAX2 with Perl

    Kenneth Porter, Dec 13, 2003, in forum: XML
    Replies:
    2
    Views:
    492
    Tad McClellan
    Dec 13, 2003
  2. Abby Lee
    Replies:
    5
    Views:
    443
    Abby Lee
    Aug 2, 2004
  3. Dr_Z2A

    Good online tutorials on Perl

    Dr_Z2A, Nov 1, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    107
    Veli-Pekka Tätilä
    Nov 2, 2005
  4. clarjon1

    More perl tutorials

    clarjon1, Jan 21, 2008, in forum: Perl Misc
    Replies:
    8
    Views:
    102
    Uri Guttman
    Jan 22, 2008
  5. Steve
    Replies:
    4
    Views:
    117
    RedGrittyBrick
    Mar 29, 2010
Loading...

Share This Page