Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Passing a filehandle to subroutine

by GotToBTru (Prior)
on Aug 10, 2017 at 18:02 UTC ( #1197197=note: print w/replies, xml ) Need Help??

in reply to Passing a filehandle to subroutine

What do you mean by losing the line? That it does not print or that it does not get stored in @ref? Consider the following suggestions:

  1. Use tell to remember the position in the file before you read each line, and use seek to reposition the pointer to there before calling SubOut
  2. Print $line before calling SubOut or pass $line to SubOut and push it onto @ref there

But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1197197]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2021-04-21 00:08 GMT
Find Nodes?
    Voting Booth?

    No recent polls found