Mailing List Archive

Missing operator warning
Having trouble ridding myself of the following warning:

String found where operator expected at import_pkg line 816, near "} "CONNREQ\n""
(Missing operator before "CONNREQ\n"?)

In converting stuff from 4 to 5, I am taking out the globs that were being
passed between functions and replacing with references. In this case, I am
trying to open a socket connection in a subroutine, and if it opens and
connects correctly, return the filehandle to the caller, by:

socket(S, AF_INET, SOCK_STREAM, $tcp);

<other bind/connect stuff>

$$conn = S;

<other stuff>

print $$conn "CONNREQ\n";

I have tried assigning '::S' to $$conn, and I have tried setting $$conn to
::S right off the bat and opening that, instead. None of the internal calls
(socket, bind, connect) fail, but the print warning pops up. I want to do
this the right way, so that there is no warning. How do I?

Randy
--
^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
Randy J. Ray -- U S WEST Technologies IAD/CSS/DPDS Phone: (303)607-5268
Denver, CO rjray@lookout.ecte.uswc.uswest.com

I don't suffer from insanity. I enjoy every minute of it.
Re: Missing operator warning [ In reply to ]
>
>Having trouble ridding myself of the following warning:
>
>String found where operator expected at import_pkg line 816, near "} "CONNREQ\n""
> (Missing operator before "CONNREQ\n"?)

Clarification: the above was from a case where I tried:

print ${$conn} "CONNREQ\n";

in an effort to get rid of it. The usual error I see is:

String found where operator expected at import_pkg line 816, near "$conn "CONNREQ\n""
(Missing operator before "CONNREQ\n"?)

Randy
--
^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^v^
Randy J. Ray -- U S WEST Technologies IAD/CSS/DPDS Phone: (303)607-5268
Denver, CO rjray@lookout.ecte.uswc.uswest.com

I don't suffer from insanity. I enjoy every minute of it.