Can't find in documentation how to pass stdin to a
perl code ..
IIRC, the code in the cell is passed to perl (or the selected interpreter) on stdin. If it reads line-by-line, you could presumably put the input you want just after the line that tries to read from stdin. If it reads the whole lot and then tries to run it, you're out of luck.