Perhaps you'd have better luck with a package from CPAN? <a href="http://search.cpan.org/perldoc?IO::Uncompress::Gunzip">http://search.cpan.org/perldoc?IO::Uncompress::Gunzip</a><div><br></div><div><a href="http://search.cpan.org/perldoc?IO::Uncompress::Gunzip"></a>I can't (be bothered to) find if it's doing everything in Perl, or if it's calling a library somewhere, but it should probably at least get around problems with system calls.<br>
<br><div class="gmail_quote">2010/2/8 Quantum Mechanic <span dir="ltr"><<a href="mailto:quantum.mechanic.1964@gmail.com">quantum.mechanic.1964@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Tue, Feb 2, 2010 at 10:19 AM, Robert Pike <span dir="ltr"><<a href="mailto:roberthpike@yahoo.com" target="_blank">roberthpike@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
Hi All,<br>
I've been passed a script that does unzipping of files and I can't seem to get it to work on a Windows machine. The server I'm trying this on I have to VPN in to. I've commented out the code that is trying to unzip a file and decided to put a simplier command in and see if I can get that to work but still w/o success.<br>
<br>
my $testStr = "dir"; #--- line 1<br>
my $newTest = `$testStr`;<br>
print "<br>Test string returned :" . $newTest . "<br>";<br>
<br>
When I run the overall script I get errors on the third line of code above telling me <name of <a href="http://script.pl" target="_blank">script.pl</a>>: Use of uninitialized value $newTest in concatenation (.) or string at <name of script>.pl line 82.<br>
I'm trying this simplier example to see if I can get it working first, the piece of code in the script (I was passed) is trying to use the gunzip executable but w/o success (i.e. gunzip -cf <$filePath) using the backticks again. Any help would be appreciated. Thanks.<br>
</blockquote></div><br></div>"dir" is a builtin command, and doesn't exist anywhere as an executable by default. On my XP machine, I'd have to issue<br><br> cmd /c "dir"<br><br>You would have the same problem on *nix with builtins if the shell didn't interpret them. For instance, `setenv` does nothing when called from perl, though it does from the command line.<br>
<br>(However, I doubt that this is your original problem -- most likely you've created an unrelated problem by trying to make the script simpler.)<br><font color="#888888"><br>-- <br>-QM<br>Quantum Mechanics: The dreams stuff is made of<br>
</font><br>_______________________________________________<br>
kw-pm mailing list<br>
<a href="mailto:kw-pm@pm.org">kw-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/kw-pm" target="_blank">http://mail.pm.org/mailman/listinfo/kw-pm</a><br></blockquote></div><br></div>