Re: Naming a variable from value of a scalar.
In a message dated 1/17/2003 6:04:41 PM Eastern Standard Time, [EMAIL PROTECTED] writes: Is it possible to name a variable as the numeric value of a scalar? Well, all scalar variables you create must start with a letter. But, if you're talking about something like this: $var = hello; ${$var} = 1; print $hello; You can do it.
Re: Naming a variable from value of a scalar.
WilliamGunther == WilliamGunther [EMAIL PROTECTED] writes: WilliamGunther In a message dated 1/17/2003 6:04:41 PM Eastern Standard Time, WilliamGunther [EMAIL PROTECTED] writes: Is it possible to name a variable as the numeric value of a scalar? WilliamGunther Well, all scalar variables you create must start with a letter. But, if WilliamGunther you're talking about something like this: WilliamGunther $var = hello; WilliamGunther ${$var} = 1; WilliamGunther print $hello; WilliamGunther You can do it. But you shouldn't. Ever. And use strict rightfully keeps you from doing so. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 [EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cgi text color in tables
i can't change the text color in a single row of table (even in all table) i can use html tags it works fine than, but while using shortcuts there's no result at all statement start_html({-text='green', -bgcolor='red'}) - works fine but in stetment table({-bgcolor='purple', -text='yellow'} ... works only bgcolor - the same situation is in table row, any idea appriciated sincerely greg ***r-e-k-l-a-m-a** Chcesz oszczdzi na kosztach obsugi bankowej ? mBIZNES - konto dla firm http://epieniadze.onet.pl/mbiznes
Escape Characters
I'm trying to send mail to users returned from a database. The problem occurs when sendmail sees the @ in the email address. Is there a function to escape reserved characters? Also, does sendmail allow sending as HTML? TIA bb -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Search database problem.
On Sat, 18 Jan 2003 at 17:45, Hughes, Andrew opined: [reply cc'd to list] HA:DBD::mysql::db do failed: Duplicate entry '[EMAIL PROTECTED]' for HA:key 2 at nCSSW.pl line 787. HA: HA:I know that you tried to point me in the right direction with the code HA:snippet that you suggested. However, as I am relatively new to all this, I HA:cannot seem to make use of the error and perform decisions in the script HA:based on it. [snip] HA:Can anyone offer any suggestions on where I can find info on how to retreive HA:a database error message and make decisions on it in this context? wrap your execute() inside an eval, then examine $@. see below: HA:eval { HA: $sth-execute('[EMAIL PROTECTED]'); HA:}; HA: HA:if ($@) { HA: warn error - probably a violation of the unique constraint; HA: # return something to the user HA:} HA:else { HA: $dbh-commit; HA:} btw, this subject is off-topic for this list. if you are still having problems, you probably should post your questions to a more appropriate list. perhaps perusing http://dbi.perl.org/ will yield a better forum for your questions. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cgi text color in tables
On Saturday 18 January 2003 08:05 am, you wrote: i can't change the text color in a single row of table (even in all table) i can use html tags it works fine than, but while using shortcuts there's no result at all statement start_html({-text='green', -bgcolor='red'}) - works fine but in stetment table({-bgcolor='purple', -text='yellow'} ... works only bgcolor - the same situation is in table row, any idea appriciated sincerely greg ***r-e-k-l-a-m-a** Chcesz oszczdzi na kosztach obsugi bankowej ? mBIZNES - konto dla firm http://epieniadze.onet.pl/mbiznes this is an html specification. To affect data or text in the cells each cell must be formatted with the desired attributes. Check W3C HTML 4.01 spec. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Escape Characters
On Saturday 18 January 2003 03:44 pm, you wrote: I'm trying to send mail to users returned from a database. The problem occurs when sendmail sees the @ in the email address. Is there a function to escape reserved characters? Also, does sendmail allow sending as HTML? TIA bb Yes the perl escape character is \. This character will tell perl to ignore the next character no matter what it is. Sendmail will send anything you set it up to send (IMHO). It normally handles html just fine. The problems with html email usually happen on either end. That is, the sender or receiver. Don't blame sendmail! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Escape Characters
I have used the \, and the sendmail then worked. I was looking for something similar to the PHP addslashes(). Or maybe replace, like replace(strAdd, @, \@). Thanks, bb -Original Message- From: Craig Dean [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 18, 2003 6:16 PM To: Beginners-Cgi Subject: Re: Escape Characters On Saturday 18 January 2003 03:44 pm, you wrote: I'm trying to send mail to users returned from a database. The problem occurs when sendmail sees the @ in the email address. Is there a function to escape reserved characters? Also, does sendmail allow sending as HTML? TIA bb Yes the perl escape character is \. This character will tell perl to ignore the next character no matter what it is. Sendmail will send anything you set it up to send (IMHO). It normally handles html just fine. The problems with html email usually happen on either end. That is, the sender or receiver. Don't blame sendmail! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cgi text color in tables
i can't change the text color in a single row of table (even in all table) sincerely greg this is an html specification. To affect data or text in the cells each cell must be formatted with the desired attributes. Check W3C HTML 4.01 spec. You can mix in standard html pretty much anywhere you need to when writing CGI. Consider: start_Tr, th(font color=redKey/font), th(Value), end_Tr; gives me 'Key' as a table header in red. And if I define: my $bfr = font color=red; my $ef = /font; then start_Tr, th($bfr, Key, $ef), th($bfr, Value, $ef), end_Tr; does the same. (Note if you are not familiar with start_Tr, by specifying use CGI qw ( :standard *table *Tr); the table method can be realized as start_table end_table pairs and table rows can be realized as start_Tr end_Tr pairs) HTH -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]