Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!axion!tharr!gustav From: gustav@tharr.UUCP (Paul Moore) Newsgroups: comp.lang.perl Subject: Possible problem with syscall() Message-ID: <1454@tharr.UUCP> Date: 26 Nov 90 19:13:22 GMT Reply-To: gustav@tharr.UUCP (Paul Moore) Organization: Public access to Usenet in the UK Lines: 27 There appears to be a problem with syscall() in perl. When perl is working out whether an argument is a string or an integer, it decides by working out whether the argument looks like a number. But what about the *string* "1"? The above is a bit vague, as I have no experience of syscall() under unix, so I can't say whether this is a real problem. I encountered it while porting perl to my machine (the Acorn Archimedes - if anyone is interested in this port, get in touch!), where I made syscall() call the operating system routines. These include a "print a string" call, and I noticed the problem when I tried to print "1" - as mentioned above. However, from what I can gather of unix syscall(), it allows you to call any system call available - so what about syscall(creat,"1",0666) [or however you would say it] to create a file "1"? Gustav. -- ------------------------------------------------------------------------------ Really: Paul Moore, 10, Mulberry Rise, Firdale Park, Northwich, ENGLAND E-Mail: pmoore@cix.compulink.co.uk or: gustav@tharr.uucp (...!ukc!tharr!gustav) "I hadda documentation once, but I drink a big-a glass of warm-a salty water anna it went away like-a dat" (Duke Leonardi, Cerebus 'Church & State') ------------------------------------------------------------------------------ [ Posted from: tharr - *free* public access to Usenet in the UK 0234 261804 ]