<div class="gmail_quote">On Tue, Feb 2, 2010 at 10:19 AM, Robert Pike <span dir="ltr"><<a href="mailto:roberthpike@yahoo.com">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>"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><br>-- <br>-QM<br>Quantum Mechanics: The dreams stuff is made of<br>