Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: copying files through modules

by K_M_McMahon (Hermit)
on May 18, 2005 at 06:44 UTC ( [id://458087]=note: print w/replies, xml ) Need Help??


in reply to copying files through modules

Hello Pete, welcome to the monastery. Your question is not very clear and you are new here, so let me start with a little advice:

Read How do I post a question effectively? AND
Writeup Formatting Tips ... these will help you form your questions more effectively.

Specifically:
Which module are you talking about.
by .pl file do you mean your script? Perl scripts do not have to end in .pl
Any sample code to illustrate the question (i.e. what have you tried?)? use code tags and paste into your question.
what is the ultimate goal that you are trying to reach, remember TIMTOWTDI with perl.
use strict and warnings.

-Kevin
my $a='62696c6c77667269656e6440676d61696c2e636f6d'; while ($a=~m/(^.{2})/s) {print unpack('A',pack('H*',"$1"));$a=~s/^.{2}//s;}

Replies are listed 'Best First'.
Re^2: copying files through modules
by peeeeeeeeeeete (Initiate) on May 19, 2005 at 01:58 UTC
    hi Guys, Sorry abt my previous post. basically what i want to do is write a module that contains a function that returns an open filehandle at the begining of a file which i want to copy to a location specified in my local script. i'm not sure how to return a filehandle. i also dont know how i can accept a filehandle in the script. i tried this but it wouldn't work coz i use strict. copy.txt is the filename which i want to save it as. open OUTF, '>copy.txt; OUTF = MyModule::Myfunction; thanks for the help

      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

        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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2025-01-13 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (28 votes). Check out past polls.