Re: [Cascavel-pm] Código ilegivel ao olho humando atrasa processamento?
Alceu R. de Freitas Jr.
glasswalk3r em yahoo.com.br
Segunda Junho 13 05:50:29 PDT 2005
--- Daniel Ruoso <daniel em ruoso.com> escreveu:
> Em Sex, 2005-06-10 às 23:40 -0300, João Gabriel
> escreveu:
> > #!/usr/bin/perl
> > use CGI::Carp qw(fatalsToBrowser);
Cá entre nós, eu não gosto muito de usar o
"fatalsToBrowser"... acho melhor criar uma função
dentro do código assim:
sub error {
my $msg = shift;
print "<h1>Alguma mensagem para o usuário</h1>";
die "Error: $msg\n";
}
open(FILE,"<file.txt") or error("Nao consigo ler
file.txt: $!");
[]'s
Alceu Rodrigues de Freitas Junior
--------------------------------------
glasswalk3r em yahoo.com.br
http://www.imortais.cjb.net
-----------------------------------------------------------------------
A well-used door needs no oil on its hinges.
A swift-flowing stream does not grow stagnant.
Neither sound nor thoughts can travel through a vacuum.
Software rots if not used.
These are great mysteries -- The Tao Of Programming, 5.1
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
Mais detalhes sobre a lista de discussão Cascavel-pm