You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "Carter, Pamela A." <Pa...@bakeroiltools.com> on 2001/10/09 20:35:52 UTC

Session Variables in Perl

another question:

I have declared a session variable in preceeding ASP pages.  How do I call
the session variable in Perl?

FYI - It also needs to be in Currencyformat

-----Original Message-----
From: Luiz Fernando B. Ribeiro [mailto:listas_embperl@athome.pro.br]
Sent: Thursday, October 04, 2001 12:34 PM
To: Carter, Pamela A.
Subject: Re: Formatting Variables in Perl


Hi Pamela,

Try this:

$value = 200;

$value_ok = sprintf("%.2f", $value);

print "R\$ $value_ok"; # gives R$ 200.00

Resposta a sua mensagem de quinta-feira, 4 de outubro de 2001:

CPA> I am passing a variable that needs to be in currency format (with two
CPA> decimal places).  It passes as a whole number with no decimal.  How can
I
CPA> format this? 

CPA> ---------------------------------------------------------------------
CPA> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
CPA> For additional commands, e-mail: embperl-help@perl.apache.org




Sem mais,

Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
engenho@athome.pro.br

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Session Variables in Perl

Posted by Gerald Richter <ri...@ecos.de>.
>I have declared a session variable in preceeding ASP pages.  How do I call
>the session variable in Perl?
>

You have a hash called %udat. Everything you store there is preserved as
session data.

But you have to configure session handling correctly first. See
http://perl.apache.org/embperl/Embperl.pod.7.html#Session_handling

>FYI - It also needs to be in Currencyformat

That doesn't matter

Gerald



-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------

-----Original Message-----
From: Luiz Fernando B. Ribeiro [mailto:listas_embperl@athome.pro.br]
Sent: Thursday, October 04, 2001 12:34 PM
To: Carter, Pamela A.
Subject: Re: Formatting Variables in Perl


Hi Pamela,

Try this:

$value = 200;

$value_ok = sprintf("%.2f", $value);

print "R\$ $value_ok"; # gives R$ 200.00

Resposta a sua mensagem de quinta-feira, 4 de outubro de 2001:

CPA> I am passing a variable that needs to be in currency format (with two
CPA> decimal places).  It passes as a whole number with no decimal.  How can
I
CPA> format this?

CPA> ---------------------------------------------------------------------
CPA> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
CPA> For additional commands, e-mail: embperl-help@perl.apache.org




Sem mais,

Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
engenho@athome.pro.br

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Session Variables in Perl

Posted by Gerald Richter <ri...@ecos.de>.

>I don't think that you can use the same session variable from an ASP
>page to EPL pages. I could be wrong, but I would think that is the case.
>Unless you can write a wrapper that will be able to modify the Apache
>Session module or re-write that module completely.
>
>Anyone: Is it actually possible to use the same session variable across
>various languages?

Looks like I misunderstood the question. My last answer was a little bit to
short. If ASP means Apache::ASP you can use Apache::Session as storage for
Apache::ASP and then it should be possible to get these values also in an
Embperl page, but you have to pass the session id somehow. (If you set
EMBPERL_COOKIE_NAME to the name Apache::ASP uses, it might work).

If ASP means Mircosoft ASP, then there is, as Akshay said, little chance to
get this working, unless you write your own store backend for
Apache::Session which is able to retrieve and store session data from the
Mircosoft server.

Gerald


On Tue, 2001-10-09 at 13:35, Carter, Pamela A. wrote:
> another question:
>
> I have declared a session variable in preceeding ASP pages.  How do I call
> the session variable in Perl?
>
> FYI - It also needs to be in Currencyformat
>
> -----Original Message-----
> From: Luiz Fernando B. Ribeiro [mailto:listas_embperl@athome.pro.br]
> Sent: Thursday, October 04, 2001 12:34 PM
> To: Carter, Pamela A.
> Subject: Re: Formatting Variables in Perl
>
>
> Hi Pamela,
>
> Try this:
>
> $value = 200;
>
> $value_ok = sprintf("%.2f", $value);
>
> print "R\$ $value_ok"; # gives R$ 200.00
>
> Resposta a sua mensagem de quinta-feira, 4 de outubro de 2001:
>
> CPA> I am passing a variable that needs to be in currency format (with two
> CPA> decimal places).  It passes as a whole number with no decimal.  How
can
> I
> CPA> format this?
>
> CPA> ---------------------------------------------------------------------
> CPA> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> CPA> For additional commands, e-mail: embperl-help@perl.apache.org
>
>
>
>
> Sem mais,
>
> Luiz Fernando B. Ribeiro
> Engenho Soluções para a Internet
> engenho@athome.pro.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
--
http://www.5vs1.com - A Pearl Jam Fan Site

"Only when the last tree is dead, the last river damned, and the last
field paved, will we realize that we can't eat money."

"Time is long and life is short, so begin to live while you still can."
                        -Eddie Vedder


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org





-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925131
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Re: Session Variables in Perl

Posted by Akshay Arora <ak...@5vs1.com>.
I don't think that you can use the same session variable from an ASP
page to EPL pages. I could be wrong, but I would think that is the case.
Unless you can write a wrapper that will be able to modify the Apache
Session module or re-write that module completely.

Anyone: Is it actually possible to use the same session variable across
various languages?

-Akshay

On Tue, 2001-10-09 at 13:35, Carter, Pamela A. wrote:
> another question:
> 
> I have declared a session variable in preceeding ASP pages.  How do I call
> the session variable in Perl?
> 
> FYI - It also needs to be in Currencyformat
> 
> -----Original Message-----
> From: Luiz Fernando B. Ribeiro [mailto:listas_embperl@athome.pro.br]
> Sent: Thursday, October 04, 2001 12:34 PM
> To: Carter, Pamela A.
> Subject: Re: Formatting Variables in Perl
> 
> 
> Hi Pamela,
> 
> Try this:
> 
> $value = 200;
> 
> $value_ok = sprintf("%.2f", $value);
> 
> print "R\$ $value_ok"; # gives R$ 200.00
> 
> Resposta a sua mensagem de quinta-feira, 4 de outubro de 2001:
> 
> CPA> I am passing a variable that needs to be in currency format (with two
> CPA> decimal places).  It passes as a whole number with no decimal.  How can
> I
> CPA> format this? 
> 
> CPA> ---------------------------------------------------------------------
> CPA> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> CPA> For additional commands, e-mail: embperl-help@perl.apache.org
> 
> 
> 
> 
> Sem mais,
> 
> Luiz Fernando B. Ribeiro
> Engenho Soluções para a Internet
> engenho@athome.pro.br
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
-- 
http://www.5vs1.com - A Pearl Jam Fan Site 

"Only when the last tree is dead, the last river damned, and the last 
field paved, will we realize that we can't eat money." 

"Time is long and life is short, so begin to live while you still can." 
                        -Eddie Vedder


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org