Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^3: copying files through modules

by davido (Cardinal)
on May 19, 2005 at 02:29 UTC ( [id://458492]=note: print w/replies, xml ) Need Help??


in reply to Re^2: copying files through modules
in thread copying files through modules

Would it be possible to, instead of describing a problem, actually demonstrate the code you're having trouble with? Not all 1000 lines, mind you. Create a 20-line (or less) snippet that isolates and illustrates your question. I'm starting to see what you're asking, but when you start saying things like "i also don't know how i can accept a filehandle in the script", that could have several meanings.


Dave

Replies are listed 'Best First'.
Re^4: copying files through modules
by peeeeeeeeeeete (Initiate) on May 19, 2005 at 05:19 UTC
    hey, heres some code... MyMopule.pm .... .... copyFile { ... ... return aFilehandle } 1; script.pl use MyModule; my $FILE = MyModule::copyfile; $file is a handle to the file i'm copying how do i save it? thanks

      You've got me. I have no idea, since you didn't post anything close to resembling code. I cannot guess what MyModule.pm contains, and I cannot guess how it works. You cannot just save a filehandle; I can tell you that much. A filehandle is a sort of link to a file or data stream that has been opened, either for input, for output, for append, or one of several other operations. If you've been handed a filehandle, my guess is that you would first open an output filehandle too, and then from the filehandle you've been handed by MyModule you would start reading from it using the diamond operator. Then as you read each line from it, you would start writing each line to your output filehandle.

      You haven't posted any code to help me give you additional guidance, and thus, I don't have any context for which I would be able to provide any code examples either. Sorry. Try perlopentut and open for starters.


      Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2025-02-18 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found