newbie syntax error - Perl 4 -> Perl 5.6.1

newbie syntax error - Perl 4 -> Perl 5.6.1

Post by Robert Larm » Sat, 03 Aug 2002 07:10:41



Okay, so I'm a total Perl newbie.  I have an old script (that I
unfortunately inherited) that I'd like to convert to Perl 5.  I copied
it over, and I get a syntax error.  I went to perl.org, perl.com, etc.,
but can't find anything that describes the differences between 4 and 5.
  I feel like I'm shooting in the dark, and conceptually I'm just trying
to understand the code.  Anyone have a link?  Anyways, here's a snippet
that doesn't work...

syntax error at appl_request.c line 8, near "*,"
syntax error at appl_request.c line 20, near "char   last"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

int main()
{
   char * fDecodeUrl(char *, char *);

   char   buffer[5000];
   char   apalsa[10] = {0};
   char   blsa[10] = {0};
   char   gllu[10] = {0};
   char   laRaza[10] = {0};
   char   wla[10] = {0};
   char   sba[10] = {0};
   char   prefix[10] = {0};
   char   first[100] = {0};
   char   middle[100] = {0};
   char   last[100] = {0};
   char   addr1[100] = {0};
   char   addr2[100] = {0};

Is there a way to debug this?

Thanks,

Robert

 
 
 

newbie syntax error - Perl 4 -> Perl 5.6.1

Post by Felix Geerinc » Sat, 03 Aug 2002 16:44:20




> Okay, so I'm a total Perl newbie.  I have an old script (that I
> unfortunately inherited) that I'd like to convert to Perl 5.  I
> copied it over, and I get a syntax error.  I went to perl.org,
> perl.com, etc., but can't find anything that describes the
> differences between 4 and 5.
> [...]
> syntax error at appl_request.c line 8, near "*,"
> syntax error at appl_request.c line 20, near "char   last"

> [c-code snipped]

It's a c program, not a Perl 4 script.

--
felix

 
 
 

newbie syntax error - Perl 4 -> Perl 5.6.1

Post by Timothy Johns » Sat, 03 Aug 2002 16:42:31


Ummm...Are you sure that isn't C?

-----Original Message-----
From: Robert Larmon

Sent: 8/1/02 3:10 PM
Subject: newbie syntax error - Perl 4 -> Perl 5.6.1

Okay, so I'm a total Perl newbie.  I have an old script (that I
unfortunately inherited) that I'd like to convert to Perl 5.  I copied
it over, and I get a syntax error.  I went to perl.org, perl.com, etc.,
but can't find anything that describes the differences between 4 and 5.
  I feel like I'm shooting in the dark, and conceptually I'm just trying

to understand the code.  Anyone have a link?  Anyways, here's a snippet
that doesn't work...

syntax error at appl_request.c line 8, near "*,"
syntax error at appl_request.c line 20, near "char   last"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

int main()
{
   char * fDecodeUrl(char *, char *);

   char   buffer[5000];
   char   apalsa[10] = {0};
   char   blsa[10] = {0};
   char   gllu[10] = {0};
   char   laRaza[10] = {0};
   char   wla[10] = {0};
   char   sba[10] = {0};
   char   prefix[10] = {0};
   char   first[100] = {0};
   char   middle[100] = {0};
   char   last[100] = {0};
   char   addr1[100] = {0};
   char   addr2[100] = {0};

Is there a way to debug this?

Thanks,

Robert

--



 
 
 

1. Newbie Question - Java Server -> tnameserv -> Perl Client

Hello all,

I am new to CORBA and I'm having difficulty trying to build a
distributed environment that mixes Java and Perl.

I am trying to use CORBA to have a Perl client "communicate" with a
Java Server.  I am using tnameserv and the Java Server starts up fine.
 If I run a Java Client it can communicate with the Java Server and
works great.  If I run a Perl Client it starts up, gets the orb, and
(I believe) communicates with the Server but then it hangs on any
method calls.  The reason I think it is communicating with the server
is that if the Server is running and the client is in the middle of a
hang and I kill the server, the client immediately dies as well with:

Exception: CORBA::COMM_FAILURE ('IDL:omg.org/CORBA/COMM_FAILURE:1.0')
    (0, COMPLETED_MAYBE)
   Communication failure

So, I believe they are talking.  For some reason the client's object
method call is not getting a) received by the server OR b) returned to
the client.

I have a feeling I'm missing some piece in this process.  Here's how
I've been doing things:

1) Start tnameserv:

tnameserv -ORBInitialPort 900 -ORBInitialHost localhost -ORBIIOPUSock
1 -ORBIIOPIPv4 1 -ORBIIOPIPv6 0

2) Start the java server

java address_book_system.AddressBookServer -ORBInitialPort 900
-ORBInitialHost localhost -ORBIIOPUSock 1 -ORBIIOPIPv4 1 -ORBIIOPIPv6
0

3) Start the perl client (/etc/orbitrc contains the parameters from
the above 2 commands)

perl AddressBookClient.pl

I am using stringified IORs for bootstraping instead of a Naming
Service.  The Java Server gets the object, stringifies it, and prints
the IOR.  The perl client reads the IOR.  I did an IOR dump of the IOR
and it looks accurate.

Any help on this would really be appreciated!

If there is a better method for Java Server -> CORBA -> Perl client
than using tnameserv I would be willing to change the ORB.  I tried
ORBit but failed miserably.  I could never figure out how to configure
the Java Server to talk to the ORBit orb.

If I posted this to the wrong list I apologize for my newbie ignorance
and would appreciate being pointed to the correct forum for this
question.

Thanks,
Susan Burgee
Software Engineering
Moonlight System, Inc.

2. Voice over IP

3. Error >>syntax error<< at >>$1<< at character 53

4. Modem Blaster 19.2 Voice

5. Can I compile perl so I can run a perl script without having perl installed?

6. Music & Midi on Linux

7. comp.lang.perl.modules The Perl 5 Module List (Reusable Software)