Re: Learning Perl



On Jun 13, 8:44 am, mer...@xxxxxxxxxxxxxx (Randal L. Schwartz) wrote:
"Jim" == Jim Cochrane <allergic-to-s...@xxxxxxxxxxxxxxxxxxx> writes:

Jim> IOW, in Perl, a semicolon is a statement separator, not a statement
Jim> terminator.

No, you're recalling Pascal.

In Perl, it is indeed a statement terminator, but only for those statements
that require it (not a while or an if, for example). However, the final
semicolon of any scope (file or block or eval-string) is optional.

print "Just another Perl hacker,"; # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<mer...@xxxxxxxxxxxxxx> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
Seehttp://methodsandmessages.vox.com/for Smalltalk and Seaside discussion

Hi Everyone,

Thank you for your candid feedback. I do appreciate it. Like I said,
this is the first step for us- We are adding features to the site to
allow users to comment on/make corrections to existing content/build
learning material together/attribute content to various sources.

Regarding usefulness- our developers, and many others have found it
very effective. But it may not be your style. I will update you when
we've added to community piece so we can put your rants/raves to good
use.

Thanks again,

Elizabeth
.



Relevant Pages

  • Re: Practical Extraction Recording Language
    ... In most languages the semicolon is a "statement terminator" so it ... It is not like that in Perl. ... In Perl the semicolon is a "statement separator" so it is only ...
    (comp.lang.perl.misc)
  • Re: Learning Perl
    ... Jim> IOW, in Perl, a semicolon is a statement separator, not a statement ... Jim> terminator. ... In Perl, it is indeed a statement terminator, but only for those statements ...
    (comp.lang.perl.misc)
  • Re: behavior of semicolon on return line
    ... A the semicolon is a statement separator in Perl. ... > where it is a statement terminator and the final semicolon is ...
    (perl.beginners)
  • Re: punctuation [OT]
    ... That depends who's reading. ... My guess is that most people would read the semicolon in ... exactly the same way as they'd read a comma in that particular sentence. ... I don't mind about semicolons, no - not unless i'm writing perl, anyway. ...
    (uk.comp.os.linux)
  • Re: Hacking a script (makemenu.pl)
    ... Thanks Willie and Jim. ... This version of perl allows globbing so I expected it ... distribution of perl would accomodate Win32's crippled OS. ... I frankly suspect that better tools have been ...
    (comp.lang.perl.misc)