in reply to In string, @var now must (NOT) be written as \@var
I'm a bit confused about this post. I am running Perl 5.6.0 and I still get the error message you describe. What version of Perl are you running?
I am wondering if there is something on *your* system that is suppressing the error (such as a globally defined array matching what's in the interpolated string). For example, this will throw an exception:
#!/usr/bin/perl use strict; print "This is dev@null.com";
Perl sees this as a problem because it cannot interpolate @null. However, if @null is already defined, it's interpolated and no error is generated:
#!/usr/bin/perl use strict; my @null = qw/ 1 2 3/; print "This is dev@null.com";
Is one of the modules you have on your system exporting an array with the name of your host? That would suppress it. Further, since you know it needs to be escaped, why not just escape it or use single quotes to suppress interpolation?
Cheers,
Ovid
Vote for paco!
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re:x2 In string, @var now must (NOT) be written as \@var
by grinder (Bishop) on Aug 03, 2001 at 01:05 UTC |