How to make a tar file using perl
Hai,
I have written a script when run will create a txt file. Now I want to make a tar file for that text file, and delete the text file created after running the script. Finally when I give the command 'ls' after running the script, I should find only a tar file, which when extracted should give a text file. Please help me in doing this. Thanks, Prakash. |
man tar
man rm |
Hi,
This is one way of doing just that (what follows is the relevant part from a larger perl script): Code:
# anything to archive Take a look at perl system function for details on how to use it, the general layout of this function is as follows: Quote:
|
Hi,
I did not get you completly. Can you please say me in detail. Thanks, Prakash. |
Hi again,
Which part(s) didn't you get? Maybe this page will help: Perl 5.10.0 documentation - ... > Functions > system or this: Learning Perl - Chapter 14. Process Management. Hope this gets you going again. |
Hi,
Thanks. I will definitely look at it. Prakash. |
All times are GMT -5. The time now is 10:50 AM. |