Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

Problem running Perl 5.001m

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


mona at szechuan

Sep 25, 1995, 1:22 PM

Post #1 of 2 (91 views)
Permalink
Problem running Perl 5.001m

Hi:

I'm getting the following error from a perl script:

Literal @dbaseversion now requires backslash at twdb_check.pl line 77, within string

The line around 77:

75: open(DBASE, $ARGV[0]);
76: while (<DBASE>) {
77: m/^@@dbaseversion\s+(\d+)/ && do {
78: next if $1 == 4;
79: unlink($Temp, $Back);
80: die "$Database is version $1, and I only know how to update version 4!";
81: };

I am new to Perl so don't be afraid to spell it out for me.

Thanks!
Mona Wong
UCSD


cameron at dap

Sep 25, 1995, 7:45 PM

Post #2 of 2 (90 views)
Permalink
Re: Problem running Perl 5.001m [In reply to]

mona [at] szechuan (Mona Wong) writes:
| I'm getting the following error from a perl script:
| Literal @dbaseversion now requires backslash at twdb_check.pl line 77, within string
| The line around 77:
[...]
| 77: m/^@@dbaseversion\s+(\d+)/ && do {

You need to say
m/^\@\@dbaseversion\s+(\d+)/ && do {

Perl5 wants less ambiguity about spots subject to variable interpolation
(i.e. /pattern/ and "string") - just as you can say $variable in each and
must say \$ for a literal $, you can say @array and must say \@ for a literal
@ character.
- Cameron Simpson
cameron [at] dap, DoD#743
http://www.dap.csiro.au/~cameron/
--
"If you could have any amount of money... How much would you want?"
"All of it."

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.