Consider this:
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
If you can't see it, there is a syntax error in $caption: closing
paren ) instead of brace }. The eval will produce no $@ and will
return the empty string.
Steve Thames wrote:
Consider this:
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
If you can't see it, there is a syntax error in $caption: closing
paren ) instead of brace }. The eval will produce no $@ and will
On Fri, Mar 31, 2006 at 05:41:32AM -0800, Steve Thames wrote:
Consider this:
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
[...]
Does anyone have any idea how to capture the syntax error in a case
like this?
You mean
On Fri, 31 Mar 2006 16:33:56 +0200, [EMAIL PROTECTED] (Tomas Zerolo)
wrote:
On Fri, Mar 31, 2006 at 05:41:32AM -0800, Steve Thames wrote:
Consider this:
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
[...]
Does anyone have
Steve Thames am Freitag, 31. März 2006 15.41:
Consider this:
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
If you can't see it, there is a syntax error in $caption: closing
paren ) instead of brace }. The eval will
On Fri, Mar 31, 2006 at 07:05:41AM -0800, Steve Thames wrote:
On Fri, 31 Mar 2006 16:33:56 +0200, [EMAIL PROTECTED] (Tomas Zerolo)
wrote:
You mean something like...
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
die $@ if $@
Hans Meier (John Doe) am Freitag, 31. März 2006 18.37:
Steve Thames am Freitag, 31. März 2006 15.41:
Consider this:
my %names = (Bob = 'Robert Brower');
my $caption = 'Name: $names{Bob)';
print eval qq|$caption|;
If you can't see it, there is a syntax error in $caption:
Ok, thanks for you help guys. I've got the answer now and its
working.
Sorry for the post here. I was posting a couple of other questions
here and didn't think about this not being related to mod_perl.
Mod_perl is where I'm using it though.
Thanks again.
On Fri, 31 Mar 2006 05:41:32 -0800,