At 08:15 PM 8/6/01 -0400, Chris Garaffa wrote:
>My question is regarding UNIX commands. I know you can get the output of a
>command using the ` notation. My script has this line:
>my $command = `mv /$formdata{name}.html /Library/WebServer/Document/About/
>$formdata{name}.html`;
You're on a Mac, and I don't know what 'shell' Perl uses there, but if this
were on Unix, you'd need to add a 2>&1 at the end of the command there if
you wanted to capture any error text.
>I get no errors, but the file isn't moved, either. Is there a way to do
>this in perl?
You may find it considerably easier in this case simply to say
rename "/$formdata{name}.html",
"/Library/WebServer/Document/About/$formdata{name}.html" or die "rename: $!\n";
:-)
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]