Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

how to read file and create duplicate file for orginal file

by virudinesh (Acolyte)
on Dec 15, 2012 at 09:27 UTC ( #1008956=perlquestion: print w/ replies, xml ) Need Help??
virudinesh has asked for the wisdom of the Perl Monks concerning the following question:

how to read file and create duplicate file for orginal file.please reply to me in my mail id virudinesh@gmail.com

Comment on how to read file and create duplicate file for orginal file
Re: how to read file and create duplicate file for orginal file
by CountZero (Bishop) on Dec 15, 2012 at 09:40 UTC
    Replies will be given here on this site and not to your private mail.

    File::Copy will do what you want.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
Re: how to read file and create duplicate file for orginal file
by dbuckhal (Monk) on Dec 16, 2012 at 04:45 UTC

    Some psuedocode that helped me write a little program to do it:


    1. choose files for copying (read a directory, for example)
    2. loop though those existing files
    3. open one of those files for reading
    4. open a target file for writing
    5. while files exist for reading
    6.....print to target
    7. close directory

    or....

    use built-in "cp" command from your OS.

    Hope this helps!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1008956]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2014-08-31 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls