grapes-less-than-greater-than-grapes: read a line from a file, like perl's <>, works well in while...

Description Usage Arguments Value Examples

Description

read a line from a file, like perl's <>, works well in while loops

Usage

1
data %<>% con

Arguments

data,

the object each line will be assigned to

con,

the connection to be read from

Value

TRUE while something was read from the connection, then FALSE after

Examples

1
2
3
4
5
6
7
8
cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file = "ex.data", sep = "\n")
fh_ex = popen('ex.data')
while(1 %/% 1)
{
  print(line)
}
pclose(fh_ex) #tidy up
unlink("ex.data")

jimhester/perlrer documentation built on May 19, 2019, 10:33 a.m.