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 ... > > W

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-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 p

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 Trina Espinoza
ent: Tuesday, August 19, 2003 11:07 PM Subject: RE: 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

RE: the File::Copy module

2003-08-19 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-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 tri

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 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? T

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

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