Nelson Ferraz nferraz em gmail.com
Terça Junho 19 04:48:33 PDT 2007

> Tenho conhecimento básico em C++ e baseando nisso o professor  
> mandou fazer um trabalho prático em Perl. Sem nunca ter dado  
> nenhuma aula de Perl. Por isso a minha ignorância nesta linguagem.

Ah, lembrei de mais um documento interessante, que fala sobre as  
"armadilhas" de perl para quem vem de outras linguagens. Em especial:

  C/C++ Traps

Cerebral C and C++ programmers should take note of the following:

     * Curly brackets are required on =if='s and =while='s.
     * You must use elsif rather than else if.
     * The break and continue keywords from C become in Perl last and  
next, respectively. Unlike in C, these do not work within a do { }  
while construct. See "Loop Control".
     * There's no switch statement. (But it's easy to build one on  
the fly, see "Basic BLOCKs and Switch Statements")
     * Variables begin with "$", "@" or "%" in Perl.
     * Comments begin with "#", not "/*" or "//". Perl may interpret  
C/C++ comments as division operators, unterminated regular  
expressions or the defined-or operator.
     * You can't take the address of anything, although a similar  
operator in Perl is the backslash, which creates a reference.
     * ARGV must be capitalized. $ARGV[0] is C's argv[1], and argv[0]  
ends up in $0.
     * System calls such as link(), unlink(), rename(), etc. return  
nonzero for success, not 0. (system(), however, returns zero for  
     * Signal handlers deal with signal names, not numbers. Use kill - 
l to find their names on your system.


(Este documento ainda precisa ser traduzido)

Mais detalhes sobre a lista de discussão Cascavel-pm