Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Passing a filehandle to subroutine

by GotToBTru (Prior)
on Aug 10, 2017 at 18:02 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-23 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found