Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, I've got a problem that Im not sure how to go about solving as I've never done anything like this before.

Basically theres this script, MID_poc_constructor.pl, that when executed, produces a datafile.

I need to create a script to execute the above script, if done so successfully, it will create a Package File (pkf) and archive this somewhere.
On successful creation of the pkf it will execute $SCL_PERL_PATH/SCL_exp.pl which will construct a tar file for the Packaged datafile (i.e. the name of the pkf create should be input into the script).

Ive have a quick look and i cant seem to find any modules that provide a function to Package and tar files. Could anyone point me in the right direction or provide some code that will do the job?

Cheers everyone, Steve

Replies are listed 'Best First'.
Re: package and tar file
by Aragorn (Curate) on Jan 08, 2004 at 08:29 UTC
    You can use Archive::Tar for creating tar files, but what is a "Package" file?

    Arjen

Re: package and tar file
by chimni (Pilgrim) on Jan 08, 2004 at 08:26 UTC

    One thing you can do is use the tar utility
    System command from your script can invoke it
    tar -cvf <filename>.tar <filename> <filename1> ..
    This will compress all the files into filename.tar.
    to untar just do
    tar -xvf hello.tar
    HTH,
    chimni