Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Error using system() and tar with several options

by Crackers2 (Parson)
on Apr 13, 2009 at 21:38 UTC ( #757286=note: print w/replies, xml ) Need Help??


in reply to Error using system() and tar with several options

When using the multi-argument form of system, the arguments get passed directly to the binary so there's no implicit split on whitespace. So your tar command sees the "czv --exclude-from=$excludes -f" as one big parameter and tries to interpret each character as a short option.

Do this instead:

my @args = ("/bin/tar", "czv", "--exclude-from=$excludes", "-f", $st +orageLocation.$archiveName, $archiveDir );

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://757286]
help
Chatterbox?
[james28909]: i can extract a certain tree manually by regexing the html file for a starting anchor, then i send the position of the match to a sub and then seek to that position in the file and keep up with div tags (for now)
[james28909]: how can i manage multiple tags? other than div?
[james28909]: i count the div and /div and when count == 0 it means i have got that nested tree

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-04-25 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (448 votes). Check out past polls.