lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>From lua-l@tecgraf.puc-rio.br Wed Dec 30 03:10:39 1998
>From: Elan <icimjs@loop.com>
>
>Could someone illustrate this use of readfrom such that 
>a = readfrom("|hello")
>will execute the file "hello" and assign the output of "hello" to the
>variable a?

try:

readfrom("|ls")
a=read(".*")

>(I tried finding the implementation of readfrom in the source files, hoping
>to be able to answer this question myself, by searching for "popen", but I
>couldn't find the file that contains the implementation.)

the file is liolib.c

--lhf