473,288 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

syntax error near unexpected token

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 6799
Motoma
3,237 Expert 2GB
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 Expert 2GB
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
If you comment out that line do you still get an error?
Oct 6 '07 #4
KevinADC
4,059 Expert 2GB
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 `('...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.