473,467 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

syntax error near unexpected token

1 New Member
hey ,
i m getting error listed below plz help me

/virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/new_mcx.pl: line 14: syntax error near unexpected token `"/usr/bin/wget -O /tmp/mcx.dat http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS&pwd=CZ33M3KZ53"'

Expand|Select|Wrap|Line Numbers
  1.  #!/usr/bin/perl
  2. #Purpose : To create MCX DAT file from mcx feed coming from mcxindia.com
  3. #Author : Yatin Patil
  4.  
  5. # url for mcx feed
  6. #$SOURCE="http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS\\&pwd=CZ33M3KZ53";
  7. #$TARGET="/virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/mcx.dat";
  8. #$cmd="/usr/bin/wget -O /tmp/mcx.dat $SOURCE";
  9. #$cmd1="/bin/cp  /tmp/mcx.dat -d $TARGET";
  10. #$cmd="/usr/bin/wget -O /tmp/mcx.dat http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS&pwd=CZ33M3KZ53";
  11. #system($cmd);
  12. #system($cmd1);
  13.  
  14. system("/usr/bin/wget -O /tmp/mcx.dat http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS&pwd=CZ33M3KZ53");
  15. system("/bin/cp /tmp/mcx.dat -d /virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/mcx.dat");
  16. open FILE, "/virtualHosts/beta.myiris.com/htdocs/commodities/commd_admin/CRONJOB/new_cronjob/mcx.dat" or die $!;
  17. $fname="mcx1.dat";
  18.  
  19. #delete DAT file if exist
  20.     if(-e $fname)
  21.         {
  22.                 unlink $fname;
  23.         }
  24.  
  25. #Reading file for parsing mcx data
  26. while(defined ($val=<FILE>))
  27. {
  28.     @result=split(/\|/,$val);
  29.     open FO, ">>mcx1.dat" or die $!;
  30.     chmod(0777,"mcx1.dat");
  31.     $count=scalar(@result);
  32.     #print FO $count;
  33.  
Oct 5 '07 #1
4 6807
Motoma
3,237 Recognized Expert Specialist
I have moved this thread over the the PERL forum, as I think the experts there are most qualified to answer your question.
Oct 5 '07 #2
KevinADC
4,059 Recognized Expert Specialist
where do you see that error? Is it in an error log? I don't see anything wrong with that line as far as syntax goes.
Oct 5 '07 #3
kaioshin00
46 New Member
If you comment out that line do you still get an error?
Oct 6 '07 #4
KevinADC
4,059 Recognized Expert Specialist
I wonder if the "-" is being interpreted as an operator? Try escaping it:

Expand|Select|Wrap|Line Numbers
  1. system("/usr/bin/wget \-O /tmp/mcx.dat http://www.mcxindia.com/xmlurl/GetTouchLine.aspx?userid=IRIS&pwd=CZ33M3KZ53");
Oct 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SaCompGeek | last post by:
I have a class that defines a Key/Name value collection that i generated by and XML Element with multiple attributes. The attribute are used to create the collection of 'Binate' objects. This is...
4
by: Bob Stearns | last post by:
The statement: merge into nullid.animals_et_in t1 using is3.animals t2 on t1.sire_assoc=t2.assoc and t1.sire_prefix=t2.prefix and t1.sire_regnum=t2.regnum when matched then update set...
5
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
4
by: lisa | last post by:
I have an XML file that starts like this: <?xml version="1.0" encoding="ISO-8859-1" xmlns:fn="http://www.w3.org/2005/xpath-functions"?> <Authors> <Author> <ID>2</ID>...
12
by: Yusuf | last post by:
I'm sorry for the second post in as many hours, and both about structs. The code below compiles. The variables test1 and test2 are structures of datatype teststruct1 and teststruct2. The size of...
1
by: FightClubDiego | last post by:
Hey.. I've been working on these sign up / log in forms for my new Game Site, and everything else in the game works but the registration!! I keep ketting the unexpected $end and Im tired of it! Here...
4
by: manontheedge | last post by:
I'm using SSH Secure Shell to connect to a Linux machine ... when I try to run the compiled code I have, I keep getting these errors ... ./p2.c: line 5: syntax error near unexpected token `('...
3
by: nvr | last post by:
Hi all I am doing the socket programming for the client side. but the code is not compiling and i am getting the below error ./Clientsend.c: line 11: syntax error near unexpected token `('...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.