[Boston.pm] (no subject)

2004-09-01 Thread Palit, Nilanjan
I thought this is possible, but maybe I'm wrong. Ok, here's the issue: I want to print the values of a bunch of variables so I thought I'll take a shortcut and do this: foreach (qw(var1 var2 var3 var4)) { print $_ - ${$_}\n; } I had thought that interpolating the variable name (${$_})

Re: [Boston.pm] RE: Interpolating variables

2004-09-01 Thread Ronald J Kimball
On Wed, Sep 01, 2004 at 08:11:22AM -0700, Palit, Nilanjan wrote: I want to print the values of a bunch of variables so I thought I'll take a shortcut and do this: foreach (qw(var1 var2 var3 var4)) { print $_ - ${$_}\n; } I had thought that interpolating the variable name (${$_})

RE: [Boston.pm] Interpolating variables

2004-09-01 Thread Tal Cohen
You can also try: foreach (qw(var1 var2 var3 var4)) { eval ('print '.$_.' - $'.$_.'\n'); } Either way works. Tal Cohen PS ... but it printed nothing. Did you assign a value to $var1, $var2, $var3, $var4? :) -Original Message- From: [EMAIL PROTECTED]

[Boston.pm] Re: Interpolating Variables

2004-09-01 Thread Bogart Salzberg
Y'all are quick on the send button. To repeat... I thought this is possible, but maybe I'm wrong. Ok, here's the issue: I want to print the values of a bunch of variables so I thought I'll take a shortcut and do this: foreach (qw(var1 var2 var3 var4)) { print $_ - ${$_}\n; } I had thought

RE: [Boston.pm] RE: Interpolating variables

2004-09-01 Thread Palit, Nilanjan
Thanks for the responses. I did use my to declare the variables - removing that allowed me to reference the variables correctly. -Nilanjan PS: Apologies for the multiple posts. I post rather infrequently and the time before this, I had had a lot of problems (which I found out later was due to

Re: [Boston.pm] RE: Interpolating variables

2004-09-01 Thread Uri Guttman
PN == Palit, Nilanjan [EMAIL PROTECTED] writes: PN Thanks for the responses. I did use my to declare the variables - PN removing that allowed me to reference the variables correctly. and no one warned you about the evils of doing that. read this:

Re: [Boston.pm] Setting cookies in different browsers

2004-09-01 Thread Uri Guttman
AB == Alex Brelsfoard [EMAIL PROTECTED] writes: AB I am not using CGI to handle the information coming in from forms. It's a AB long story, but believe me, it works out better this way. i don't believe you. show us proof. 99% of home rolled cgi solutions have bugs and security holes. are

Re: [Boston.pm] Setting cookies in different browsers

2004-09-01 Thread Alex Brelsfoard
AB I am not using CGI to handle the information coming in from forms. It's a AB long story, but believe me, it works out better this way. URI i don't believe you. show us proof. 99% of home rolled cgi solutions URI have bugs and security holes. are you part of the 1% who knows all the URI

Re: [Boston.pm] RE: Interpolating variables

2004-09-01 Thread David Cantrell
On Wed, Sep 01, 2004 at 10:32:40AM -0700, Palit, Nilanjan wrote: Thanks for the responses. I did use my to declare the variables - removing that allowed me to reference the variables correctly. You almost certainly don't want to do what you were trying to do though. A hash would be the logical

Re: [Boston.pm] RE: Interpolating variables

2004-09-01 Thread Uri Guttman
AS == Aaron Sherman [EMAIL PROTECTED] writes: AS On Wed, 2004-09-01 at 14:35, Uri Guttman wrote: the symbol table is just a special hash tree with global side effects. so why not just use a regular hash as it is safer (no global side issues), more flexible (you can pass it around,

Re: [Boston.pm] Setting cookies in different browsers

2004-09-01 Thread Alex Brelsfoard
Thanks. Good stuff. --Alex - Original Message - From: Jeremy Muhlich To: [EMAIL PROTECTED] Sent: Wednesday, September 01, 2004 3:30 PM Subject: Re: [Boston.pm] Setting cookies in different browsers On Wed, 2004-09-01 at 14:53, Alex Brelsfoard wrote: I am most certainly