CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
"Bareword found where operator expected" error

 



anupma_83
New User

Feb 4, 2010, 11:32 PM

Post #1 of 2 (2919 views)
"Bareword found where operator expected" error Can't Post

Hi,

I am getting below error when trying to bcp my stored proc from perl script:

Bareword found where operator expected at testfile.pl line 239, near ""bcp $sqlq
uery queryout "D"
(Missing operator before D?)
Bareword found where operator expected at testfile.pl line 239, near "/Perl/test
"
(Missing operator before test?)
Array found where operator expected at testfile.pl line 239, at end of line
String found where operator expected at testfile.pl line 239, near "txt" -f D:/P
erl/test space/invalid_address.fmt -S $SVR -U $USR -P $PSW""
syntax error at testfile.pl line 239, near ""bcp $sqlquery queryout "D"
Execution of testfile.pl aborted due to compilation errors.

The bcp command is:

system "bcp $sqlquery queryout "D:/Perl/test space/test.txt" -f D:/Perl/test space/invalid_address.fmt -S $SVR -U $USR -P $PSW";

Can anyone please suggest the solution....


7stud
Enthusiast

Feb 5, 2010, 1:34 AM

Post #2 of 2 (2915 views)
Re: [anupma_83] "Bareword found where operator expected" error [In reply to] Can't Post

See if you can spot the error here:

Code
my $string = 'hello'wor'ld';

You have the same error in your code.


(This post was edited by 7stud on Feb 5, 2010, 1:38 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives