in reply to Format file
Every time I try to run this code I get a syntax error at my.
$SELECT.DAT2 is not a valid variable name.
my $SELECT.DAT2
means
(my $SELECT) . "DAT2"
Contrary to what you said, it's not a syntax error, but it's obviously not what you want. That's why you should always use use strict;. That would have made it a syntax error. It catches so many errors.
There is a syntax error in your code, though.
$ perl a.pl String found where operator expected at a.pl line 4, near ""NO" "\n"" (Missing operator before "\n"?) syntax error at a.pl line 4, near ""NO" "\n"" a.pl had compilation errors.
This is caused by a missing comma.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Format file
by cdarke (Prior) on Jan 22, 2011 at 05:56 UTC |