[SP-pm] Criar Sub Rotinas

Daniel de Oliveira Mantovani daniel.oliveira.mantovani at gmail.com
Fri Sep 12 18:32:23 PDT 2008


Entendi;
#!/usr/bin/perl

use strict;
use warnings;
use CGI qw( :standard );


print header(),start_html("Simple Life Corp");
print align("teste");
print end_html();


sub align
{
my $align = shift;
return "<p align=center>$align</p>"
}

O Eden mesmo off me ajudo.

2008/9/12 Daniel de Oliveira Mantovani <daniel.oliveira.mantovani em gmail.com>

> Olá pessoal estou aprendendo CGI, para futuramente aprender Catalyst, não
> entendi a lógica de criar Sub Rotinas:
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
> use CGI qw( :standard );
>
>
> print header(),start_html("Simple Life Corp");
> print align();
> print end_html();
>
>
> sub align
> {
> my $align = ();
> return "<p align=center>$align</p>"
> }
> Olhe o start_html(), detnro dele posso por meu título, quis criar um
> parecido s´o que com <p align=center> nao deu muito certo, gostaria de uma
> orientação.
> Obrigado.
>
> --
> Daniel de Oliveira Mantovani
> "A sede pelo aprendizado é insaciável"
> http://mantovanihouse.blogspot.com/
> ------------------------------------------------------------
>



-- 
Daniel de Oliveira Mantovani
"A sede pelo aprendizado é insaciável"
http://mantovanihouse.blogspot.com/
------------------------------------------------------------
-------------- Pr?xima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://mail.pm.org/pipermail/saopaulo-pm/attachments/20080912/6000a325/attachment.html>


More information about the SaoPaulo-pm mailing list