in reply to What is wrong with tar?

UPDATE: s/single quotes/backticks/ and oops, chdir is a perl func... /me face red

Hey,

That error message is telling you "missing semicolon on previous line". So if you go to line 13, then back up one line you find the problem line:

12:--> "chdir $toloc or dir qq(can't chdir $toloc $!\n);" 13: my $result = `/usr/bin/tar -xvpf $test`;
You don't have a semicolon at the end of that line. You've got a quoted string ("chdir... );") with no semicolon.

Also, you've misspelled die as "dir". You want something like:

chdir $toloc or die qq(can't chdir $toloc $!\n);

Hope this helps you the next time you have perl complaining about some error--now you know how to find more-or-less where your error is.

AH

p.s. I'll let someone else give the standard use strict and warnings speech.

----------
Using perl 5.8.6 unless otherwise noted. Apache/2.0.54 unless otherwise noted. Fedora Core 4 (2.6.11-1.1369_FC4) unless otherwise noted.