home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 5064 < prev    next >
Encoding:
Text File  |  1992-07-31  |  701 b   |  26 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!psinntp!ctp!jmay
  3. From: jmay@ctp.com (Jason May)
  4. Subject: Setting perl variables from C
  5. Sender: news@ctp.com ( C News - Network News BBS)
  6. Message-ID: <1992Jul30.234127.24976@ctp.com>
  7. Date: Thu, 30 Jul 1992 23:41:27 GMT
  8. Organization: Cambridge Technology Partners
  9. Lines: 15
  10.  
  11.  
  12. How can I set the value of a perl variable from a C function linked in
  13. via uperl.o?  I've figured out that I can retrieve the value of a perl
  14. scalar with
  15.  
  16.     STAB *stab;
  17.     char *val;
  18.     stab = stabent (name, FALSE);
  19.     val = (char *)str_get (stab_val (stab));
  20.  
  21. While we're at it, how can I set and read array and assoc. array elements
  22. from C?  Tom?  Larry?
  23.  
  24. Thanks,
  25. -Jason (jmay@ctp.com)
  26.