Re: the File::Copy module

2003-08-21 Thread R. Joseph Newton
Dan Muey wrote: That won't work if the write decides that file1 should be a variable instead. Just a thought :-/ Ok, in the example file1 wasn't a variable but if you dod want to do \\machine1\share\$file copy(qq(\\machine1\share\$file),qq(\\mahine2\share\$file)) or ... Would that

RE: the File::Copy module

2003-08-20 Thread Saadat Saeed
Hello, Thanks for all your inputs now below you mentioned copy(qq(\\machine1\share\$file),qq(\\mahine2\share\$file)) sorry for my ignorance but what is qq also if I want to be smart and copy it to the c: drive of some user - assuming I am running the script from a Domain Admin login eg.

Re: the File::Copy module

2003-08-20 Thread Trina Espinoza
: the File::Copy module Hello, Thanks for all your inputs now below you mentioned copy(qq(\\machine1\share\$file),qq(\\mahine2\share\$file)) sorry for my ignorance but what is qq also if I want to be smart and copy it to the c: drive of some user - assuming I am running the script from

Re: the File::Copy module

2003-08-20 Thread James Edward Gray II
On Wednesday, August 20, 2003, at 01:45 AM, Trina Espinoza wrote: I only know the first part. qq is double quotes. As opposed to the qw which is single quotes. Close. qq() is double quotes, you got that right. q() is single quotes. qw() is the Quote Words operator. It turns this: qw(some

RE: the File::Copy module

2003-08-20 Thread Jeff Westman
--- Saadat Saeed [EMAIL PROTECTED] wrote: Hello, Thanks for all your inputs now below you mentioned copy(qq(\\machine1\share\$file),qq(\\mahine2\share\$file)) sorry for my ignorance but what is qq In perl, there are many things to do things right. That is the beauty of perl,

RE: the File::Copy module

2003-08-20 Thread David Wall
--On Wednesday, August 20, 2003 8:01 AM -0700 Jeff Westman [EMAIL PROTECTED] wrote: As for qhat 'qq' does, it behaves like double quotes. As you pointed out, it CAN make your code harder to read (!) sincemany people are not accustomed to it. For me, '' is more customary (with C/C++ or shell),

Re: the File::Copy module

2003-08-19 Thread Jeff Westman
Try: use strict; use warnings; ... my $returnValue = copy(machine1\\share\\file1,machine2\\share\\file2); unless ($returnValue) warn Copy failed: $!; (not tested) -JW --- Saadat Saeed [EMAIL PROTECTED] wrote: I was just reading the File::Copy module. Now on a pure

RE: the File::Copy module

2003-08-19 Thread Dan Muey
Try: use strict; use warnings; ... my $returnValue = copy(machine1\\share\\file1,machine2\\share\\file2); ^ I think that quote will cause problems. Have you tried single quotes also? That way you don't have to worry about properly escaping the \.

RE: the File::Copy module

2003-08-19 Thread Jeff Westman
--- Dan Muey [EMAIL PROTECTED] wrote: Try: use strict; use warnings; ... my $returnValue = copy(machine1\\share\\file1,machine2\\share\\file2); ^ I think that quote will cause problems. Have you tried single quotes also? That way you don't have

Re: the File::Copy module

2003-08-19 Thread Gabriel Cooper
Jeff Westman wrote: Try: use strict; use warnings; ... my $returnValue = copy(machine1\\share\\file1,machine2\\share\\file2); you probably don't want that first quotation mark before copy. unless ($returnValue) warn Copy failed: $!; you could do it in one step as:

RE: the File::Copy module

2003-08-19 Thread Dan Muey
--- Dan Muey [EMAIL PROTECTED] wrote: Try: use strict; use warnings; ... my $returnValue = copy(machine1\\share\\file1,machine2\\share\\file2); ^ I think that quote will cause problems. Have you tried single quotes also? That way you