Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

package require tar

by doomrak (Initiate)
on Nov 29, 2009 at 09:01 UTC ( #809980=perlquestion: print w/ replies, xml ) Need Help??
doomrak has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a tcl script calling a lot of perl scripts.

In the beginning of one of the scripts is the command:
#!/bin/sh #\ exec wish "$0" "$@" package require tar
The use is later on down the script in the following lines:
cd [file dirname $source] tar::create /tmp/directoryCopy.[pid].tar [file tail $source] cd $pwd cd $dest tar::untar /tmp/directoryCopy.[pid].tar file delete -force /tmp/directoryCopy.[pid].tar cd $pwd
As soon as I run the script,I get the error message:
Error in startup script: can't find package tar while executing "package require tar" (file "package.tcl" line 6)

could you pls help me debug the reason for the error?

thanks karuna

Comment on package require tar
Select or Download Code
Re: package require tar
by holli (Monsignor) on Nov 29, 2009 at 09:57 UTC
    There is no tar module on cpan, so you are probably missing a custom module of your shop/organization/whatever. where did you get the script from?


    holli

    You can lead your users to water, but alas, you cannot drown them.
Re: package require tar
by angiehope (Pilgrim) on Nov 29, 2009 at 10:07 UTC
    Hi! What operating system do you use?
    It looks like your shell script can't call tar to unpack the tar file in /tmp .
    Tcl itself can process tar files using the tcllib package.

    If you wanted to rewrite the shell script using Perl, I would install Archive::Tar

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2014-09-22 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls