Re: Ram disk filling up - File::COPY

2007-06-08 Thread Always Learning Perl
ions, if the filesystem supports doing so, will > create files with "holes" in them; that is, the file may have > arbitrarily long gaps in which there's no data. You can even have a > file that seems larger than the disk it's stored upon. > > >Whether I use Fil

Re: Ram disk filling up - File::COPY

2007-06-07 Thread Chas Owens
supports doing so, will create files with "holes" in them; that is, the file may have arbitrarily long gaps in which there's no data. You can even have a file that seems larger than the disk it's stored upon. > Whether I use File::Copy or I roll my own copy by reading and writing

Re: Ram disk filling up - File::COPY

2007-06-07 Thread Tom Phoenix
that is, the file may have arbitrarily long gaps in which there's no data. You can even have a file that seems larger than the disk it's stored upon. Whether I use File::Copy or I roll my own copy by reading and writing the file the filesystem fills up... If I use system (cp from to) I do

Re: Ram disk filling up - File::COPY

2007-06-07 Thread Mumia W.
On 06/07/2007 04:41 AM, Perl WANNABE wrote: Hi, I'm trying to copy a couple of DBM files from a disk to a RAM disk, one of the files is 500M the other quite small. [...] It looks to me like you're trying to copy a 499MB file onto a 254MB ramdisk. Since 499 is greater than 254, the file won't

Ram disk filling up - File::COPY

2007-06-07 Thread Perl WANNABE
Hi, I'm trying to copy a couple of DBM files from a disk to a RAM disk, one of the files is 500M the other quite small. This is on Slackware 10.1.0 using: This is perl, v5.8.6 built for i486-linux Whether I use File::Copy or I roll my own copy by reading and writing the file the files

Re: File:: Copy

2006-12-20 Thread D. Bolliger
Jeff Pang am Mittwoch, 20. Dezember 2006 15:09: > "Dukelow, Don" <[EMAIL PROTECTED]> > >I can't get "use File::Copy" to work. I declare it at the beginning of > >script but when I try to use it latter nothing happens. There are no > > err

Re: File:: Copy

2006-12-20 Thread Dermot Paikkos
On 20 Dec 2006 at 8:00, Dukelow, Don wrote: > I can't get "use File::Copy" to work. I declare it at the beginning > of script but when I try to use it latter nothing happens. There are > no errors and nothing is copied. > > I'm using the command! > &g

Re: File:: Copy

2006-12-20 Thread Jeff Pang
> >I can't get "use File::Copy" to work. I declare it at the beginning of >script but when I try to use it latter nothing happens. There are no errors >and nothing is copied. > Did you also add "use strict" and "use warnings" at the begin of

File:: Copy

2006-12-20 Thread Dukelow, Don
I can't get "use File::Copy" to work. I declare it at the beginning of script but when I try to use it latter nothing happens. There are no errors and nothing is copied. I'm using the command! copy($variable, $variable2); I've also tried "cp" rather th

RE: File Copy

2006-08-22 Thread Derek B. Smith
http://www.rfc-ignorant.org/' Smith, Derek wrote: > Why doesn't a copy work on each array element yet a glob does? I'm assuming you eman copy() from File::Copy? because copy()'s source doesn't do that I imagine. Is there documentation for copy() that seems to indic

Re: Perl File::Copy to Samba share

2006-05-12 Thread John W. Krahn
Eugene Kosov wrote: > John W. Krahn wrote: >>> Following is the subroutine for moving the file >>> >>> sub copyFile($$) { >> >> Your subroutine _moves_ files, it does not _copy_ files, so why is it >> named >> 'copyFile'? You really, really shouldn't use prototypes. If you need to >> verify the n

Re: Perl File::Copy to Samba share

2006-05-12 Thread Eugene Kosov
John W. Krahn wrote: Following is the subroutine for moving the file sub copyFile($$) { Your subroutine _moves_ files, it does not _copy_ files, so why is it named 'copyFile'? You really, really shouldn't use prototypes. If you need to verify the number of arguments you could do somethi

Re: Perl File::Copy to Samba share

2006-05-12 Thread John W. Krahn
You should pass this data to the sub instead of using globals. Why all the parentheses? $destination = $log unless -d $destination; return unless -s "$SRCDIR/$filename"; >if ( ( -s "$SRCDIR\\$filename" ) && ( -d $destination ) ) { >my $retur

Perl File::Copy to Samba share

2006-05-12 Thread Sonika Sachdeva
lename" ) && ( -d $destination ) ) { my $return = File::Copy::move( "$SRCDIR\\$filename", $destination ); if ( $return != 1 ) { logmsg( *LF, "Copy Error ", $filename, $destination, "$!" ); return; } }# end if for -s and -d } Thanks, skm

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Mr. Shawn H. Corey
JupiterHost.Net wrote: a) FILE::copy probably doesn;t exist but rather: File::Copy Sadly :( FILE::copy does exist in some operating systems; like MS DOS and Mac OX S. This is because they do not distinguish between uppercase and lowercase in file names. Perl seems to find the correct module

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
ne &main::copy > > > > What could be the mistake? > > a) FILE::copy probably doesn;t exist but rather: File::Copy > > b) you have not imported copy() into main:: > solution: > > 1) import it into main:: - use File::Copy qw(copy); >2) Call it by

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread JupiterHost.Net
Hello, Please try to write cleaner code, its hard to read :) (See "Perl Best Practices" by Damian Conway, Oreilley) undefined subroutine &main::copy What could be the mistake? a) FILE::copy probably doesn;t exist but rather: File::Copy b) you have not imported co

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
; > > On 3/16/06, Dermot Paikkos <[EMAIL PROTECTED]> wrote: > > > > Is that File::Copy or FILE::copy? The former is what you want. > > Dp. > > > > > > On 16 Mar 2006 at 9:53, Sonika Sachdeva wrote: > > > > > Hi All, > > > >

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
Thanks for your response. I did change the module name. It works but now it hangs at the copy command without giving any warning/error. ( plz refer the code) thanks, On 3/16/06, Dermot Paikkos <[EMAIL PROTECTED]> wrote: > > Is that File::Copy or FILE::copy? The former is what yo

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Mr. Shawn H. Corey
Sonika Sachdeva wrote: Hi All, I have used FILE::copy , perl syntax check is OK. and am getting the following error when it tries to perform the copy function . This is on windows system. That has to be: use File::Copy; Case is important in Perl. On certain OSes, like Mac OS X, case in file

Re: FILE::copy gives error undefined subroutine

2006-03-16 Thread Dermot Paikkos
Is that File::Copy or FILE::copy? The former is what you want. Dp. On 16 Mar 2006 at 9:53, Sonika Sachdeva wrote: > Hi All, > > I have used FILE::copy , perl syntax check is OK. > and am getting the following error when it tries to perform the copy > function . This is on

FILE::copy gives error undefined subroutine

2006-03-16 Thread Sonika Sachdeva
Hi All, I have used FILE::copy , perl syntax check is OK. and am getting the following error when it tries to perform the copy function . This is on windows system. my $retval=system("perl \"$SCRIPTDIR\\test.pl\" $FILEHASH{$filename}[3]") ; if($retval != 0) { print LO

Re: What is wrong with this file copy script

2006-03-12 Thread JupiterHost.Net
Hello Harry, hpdb cp'ing ./dir1/2765 => ./tmp/001 Failed to copy ./dir1/2765 => ./tmp/001: No such file or directory at ./renum2.pl line 111 I didn't want to read the entire script (a triffle busy ;p) but perhaps File::Copy::Recursive (IE dircopy()) will help.

Re: What is wrong with this file copy script

2006-03-12 Thread Shawn Corey
Harry Putnam wrote: #!/usr/local/bin/perl -w @directories = ("./dir1", "./dir2"); for(@directories) { opendir(WRK_DIR,"$_"); opendir(WRK_DIR,$_) or die "cannot opendir $_: $!\n"; chdir $_; chdir $_ or die "cannot chdir $_: $!\n"; # This fails for the second directory since it chdir to

Re: What is wrong with this file copy script

2006-03-12 Thread Shawn Corey
Harry Putnam wrote: That formula did'nt do it either but it did show a different error that throws some light on this. Notice the first file is the directory name hpdb cp'ing ./dir1 => tmp/001 Failed to copy ./dir1 => tmp/001: Is a directory at ./renum2.pl line 113 Thats why copy i

Re: What is wrong with this file copy script

2006-03-12 Thread Harry Putnam
Shawn Corey <[EMAIL PROTECTED]> writes: > When File::Find goes looking for files, it chdir's to each directory > its looking in. When it's in ./dir1, there is no ./dir1/tmp to copy > files into, so you get an error. Change your calling sequence of > find() to: > > find( { wanted => \&wanted, no_

Re: What is wrong with this file copy script

2006-03-12 Thread Harry Putnam
our post and hit another snag. I decided to just scrap File::Find in favor of chdir opendir and readdir. I think the File::Copy has a problem when the left file name has a directory name in it. But leaving that a moment, I can't see why this for loop doesn't print any content for dir

Re: What is wrong with this file copy script

2006-03-12 Thread Harry Putnam
> I'm already bald so don't have the luxury of pulling hair over this. [...] > $new = $tmpdir."/".$new; > $oldf = $File::Find::name; > print "hpdb cp\'ing $oldf => $new\n"; > copy($oldf, $new) > or die "Failed to copy $oldf => $new: $!"; > } I figured out the sour

Re: What is wrong with this file copy script

2006-03-12 Thread Shawn Corey
Harry Putnam wrote: I'm already bald so don't have the luxury of pulling hair over this. I don't understand the error ouput or maybe I could get somewhere with this. Pouring over perldoc File::Copy isn't helping either... I think the error is before that but can't see

What is wrong with this file copy script

2006-03-12 Thread Harry Putnam
I'm already bald so don't have the luxury of pulling hair over this. I don't understand the error ouput or maybe I could get somewhere with this. Pouring over perldoc File::Copy isn't helping either... I think the error is before that but can't see what. The end

redirecting STDOUT/STDERR and File::Copy

2005-03-02 Thread Traeder, Philipp
Hi list, I've got some strange behaviour with redirected STDOUT/STDERR handles and calls to File::Copy - I hope someone can explain me why I'm seeing what I'm seeing here. I use the following code to redirect STDOUT and STDERR to a log file - as you can see, it's more or

Re: file::copy remote authentication

2005-01-11 Thread Jenda Krynicky
From: Paul Kraus <[EMAIL PROTECTED]> > I have a perl script that uses file::copy to copy files from a server > to the local machine. It does alot more then that but is pretty much > the jist of what is taking place. Currently i have to have the local > machine first establish

Re: file::copy remote authentication

2005-01-11 Thread JupiterHost.Net
Paul Kraus wrote: I have a perl script that uses file::copy to copy files from a server Funny, I couls only find File::Copy on cpan but no file::copy :) to the local machine. It does alot more then that but is pretty much the jist of what is taking place. Currently i have to have the local

file::copy remote authentication

2005-01-11 Thread Paul Kraus
I have a perl script that uses file::copy to copy files from a server to the local machine. It does alot more then that but is pretty much the jist of what is taking place. Currently i have to have the local machine first establish the connection so that authentication takes place. start ->

Re: File::Copy

2004-01-21 Thread Jeff 'japhy' Pinyan
On Jan 21, zentara said: >copy( "$ARGV[0]", "$ARGV[0]\.bak" ); >chmod ($mode, "$ARGV[0]\.bak"); >print "Backup completed.\n"; Why do you backslash the . in "$ARGV[0]\.bak" but not in "completed.\n"? Long story short, you don't need to \ the . in either case, and you don't need quotes around $ARG

RE: File::Copy

2004-01-20 Thread Tim Johnson
ECTED] Sent: Tuesday, January 20, 2004 4:46 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: File::Copy ->SNIP<-- So if you are on any of the three systems above andyou are NOT doing file handles, then the files should have the same file permissi

Re: File::Copy

2004-01-20 Thread Wiggins d'Anconia
Larry Guest wrote: Anyone know how to get File::Copy module to keep file permissions when it copies from one location to another? Thanks "File::Copy also provides the "syscopy" routine, which copies the file specified in the first parameter to the file specified in the se

RE: File::Copy

2004-01-20 Thread Wagner, David --- Senior Programmer Analyst --- WGO
This is what I found in ActiveState Doc concerning File::Copy: Special behaviour if syscopy is defined (OS/2, VMS and Win32) If both arguments to copy are not file handles, then copy will perform a ``system copy'' of the input file to a new output file, in order to pre

File::Copy

2004-01-20 Thread Larry Guest
Anyone know how to get File::Copy module to keep file permissions when it copies from one location to another? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: wildcard File::Copy

2003-12-10 Thread drieux
copy all files with the same name but different extensions. call me old and slow, but I would do something like: [jeeves: 21:] perl -MFile::Copy -e 'my $filename='junk' ; my @list = <$filename.*>; File::Copy::copy($_ , 'Target') foreach(@list);' [jeeves: 22:]

Re: wildcard File::Copy

2003-12-09 Thread Jenda Krynicky
From: Ben Crane <[EMAIL PROTECTED]> > Anyone know how to do a wildcard file::copy? E.g. I > want to copy a file with a certain name but different > extensions. > > I have tried concatenating ".*" to the end of a > filename (without an extension obviously) but i

Re: wildcard File::Copy

2003-12-09 Thread John W. Krahn
Ben Crane wrote: > > Hi all, Hello, > Anyone know how to do a wildcard file::copy? E.g. I > want to copy a file with a certain name but different > extensions. > > I have tried concatenating ".*" to the end of a > filename (without an extension obviously) bu

Re: wildcard File::Copy

2003-12-09 Thread drieux
On Dec 9, 2003, at 8:12 AM, Ben Crane wrote: [..] $string2 = "$string[1]".".*"; copy("$string2","$destination") || warn "could not copy files: $!"; It does not appear that $string2 is a FileHandle glob - which I think is your issue here. cf: perldoc -f glob perldoc File::Glob ciao

wildcard File::Copy

2003-12-09 Thread Ben Crane
Hi all, Anyone know how to do a wildcard file::copy? E.g. I want to copy a file with a certain name but different extensions. I have tried concatenating ".*" to the end of a filename (without an extension obviously) but it fails. This is what I had in mind...it's just a scribble

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(\\mach

Re: File::Copy & CGI.pm

2003-08-21 Thread Jenda Krynicky
From: "Yupapa.com" <[EMAIL PROTECTED]> > If you are transfering file from a local machine to a remote machine, > you do not use File::Copy module to copy files. File::Copy is used > for copying files locally. You can use Net::FTP to transfer files > from one machin

AW: File::Copy & CGI.pm

2003-08-21 Thread B. Fongo
ot; while (<$location_and_file_name >){ chomp; print DESTINATION $_; } close (DESTINATION); This work well. I used it on my recent project. Good luck -Ursprüngliche Nachricht- Von: Yupapa.com [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 21. Aug

Re: File::Copy & CGI.pm

2003-08-20 Thread Yupapa.com
HiHi~ If you are transfering file from a local machine to a remote machine, you do not use File::Copy module to copy files. File::Copy is used for copying files locally. You can use Net::FTP to transfer files from one machine to another. And of course, you will need a FTP server for the

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
') > > > or die "Copy > > > failed $!"; > > > > > > Just a thought > > > > That won't work if the write decides that "file1" > should be a > > variable instead. Just a thought :-/ > > Ok, in the ex

RE: the File::Copy module

2003-08-19 Thread Dan Muey
#x27;\\machine2\share\file2') > or die "Copy > > failed $!"; > > > > Just a thought > > That won't work if the write decides that "file1" should be a > variable instead. Just a thought :-/ Ok, in

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
u don't have to worry about properly escaping the \. copy('\\machine1\share\file1','\\machine2\share\file2') or die "Copy failed $!"; Just a thought Dmuey > > unless ($returnValue) warn "Copy failed: $!"; > > > (not tes

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

the File::Copy module

2003-08-19 Thread Saadat Saeed
I was just reading the File::Copy module. Now on a pure Win32 environment will this work copy("\\machine1\share\file1","\\machine2\share\file2"); Or should I do something else??? __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to

Re: File::Copy & CGI.pm

2003-07-12 Thread Rob Dixon
B. Fongo wrote: > Hi, > > I've a small script intended for file transfer from a windows > machine to a remote linux server. To implement that, I decided to > use two module i.e File::Basename, File::Copy and CGI.pm. > > The File::Copy is working well locally, but it

File::Copy & CGI.pm

2003-07-12 Thread B. Fongo
Hi, I've a small script intended for file transfer from a windows machine to a remote linux server. To implement that, I decided to use two module i.e File::Basename, File::Copy and CGI.pm. The File::Copy is working well locally, but it fails to copy files to a remote machine throug

Re: File::Copy -> Additional Parameters? Thank you

2003-06-12 Thread Ben Crane
Okay, Some good leads to work with...Thanx for the heads up guys!! Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: File::Copy -> Additional Parameters?

2003-06-12 Thread Beau E. Cox
- Original Message - From: "Ben Crane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 11, 2003 11:21 PM Subject: RE: File::Copy -> Additional Parameters? > Yep, I've thought of that, but with so many files > (it's an

Re: File::Copy -> Additional Parameters?

2003-06-12 Thread Rob Dixon
bscure module out there > that handled it neatly... > > If not, no worries...I'll have to go at File::Ncopy or > the long route. :) Mmmm...this might be a good idea > for a module??? Cool...fun project :) Hi Ben. Even if File::Copy were to do it for you the overhead is still there

RE: File::Copy -> Additional Parameters?

2003-06-12 Thread Ben Crane
Yep, I've thought of that, but with so many files (it's an internal backup) I don't want to slow the process down by checking the source/dest filename on both drives and their dates before copying, I was hoping for there might be an obscure module out there that handled it neatly... If not, no wor

RE: File::Copy -> Additional Parameters?

2003-06-11 Thread Tim Johnson
You could always use stat() on the files to decide which ones you want to copy... -Original Message- From: Ben Crane [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 4:31 AM To: [EMAIL PROTECTED] Subject: File::Copy -> Additional Parameters? Hi all, Anyone know if the p

Re: File::Copy -> Additional Parameters?

2003-06-11 Thread Rob Dixon
Hi Ben Ben Crane wrote: > > Anyone know if the perl module File::Copy can handle > date checks? Or whether there is another module that > only deals with copying files that are newer than the > ones they are over-writing? > > Similar to the Xcopy /D: command > [I don'

File::Copy -> Additional Parameters?

2003-06-11 Thread Ben Crane
Hi all, Anyone know if the perl module File::Copy can handle date checks? Or whether there is another module that only deals with copying files that are newer than the ones they are over-writing? Similar to the Xcopy /D: command [I don't want to use a batch file at the moment in case so

Re: eegads! File::Copy not copying

2003-02-17 Thread Paul
a small possibility -- -e just makes sure it exists. Try testing the size if it does. if (-f $file and -s _) { --- Patricia Hinman <[EMAIL PROTECTED]> wrote: > Everything "was" perfect in my little program. I gave > it a test run today. My file which copies some > demofiles is sending blank

Re: eegads! File::Copy not copying

2003-02-16 Thread R. Joseph Newton
ror: $!"); } The or operator should be a tool, not a mantra. > if(-e "/$htmlroot/$htmldir/$files[$i]" && $ok){ > push(@messages, "Copied > /$htmlroot/$htmldir/demosite/$filenames[$i],\n to > /$htmlroot/$htmldir/$files[$i]"); > } > > Anybody

Re: eegads! File::Copy not copying

2003-02-16 Thread Patricia Hinman
I combed the file and found an open statement in the wrong place. Thankyou everyone for all your help. It is appreciated! __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com -- To unsubscribe, e-mail: [E

Re: eegads! File::Copy not copying

2003-02-16 Thread Patricia Hinman
Thankyou for the advice, but it still sends blanks. Should I open up each individual file and copy it using open statements? Isn't there a switch which checks for file content. I haven't had the need to check that till now. --- Wiggins d'Anconia <[EMAIL PROTECTED]> wrote: > Precedence. > > Pat

Re: eegads! File::Copy not copying

2003-02-16 Thread Wiggins d'Anconia
Precedence. Patricia Hinman wrote: Everything "was" perfect in my little program. I gave it a test run today. My file which copies some demofiles is sending blank empty files. I've used -e to make sure it exists and checked the return value on the copy(). Both check out fine. But the files h

eegads! File::Copy not copying

2003-02-16 Thread Patricia Hinman
Everything "was" perfect in my little program. I gave it a test run today. My file which copies some demofiles is sending blank empty files. I've used -e to make sure it exists and checked the return value on the copy(). Both check out fine. But the files have no content. Any suggestions? Th

Re: copying a file without using module File::Copy

2003-02-15 Thread R. Joseph Newton
Michael Pastore wrote: > Tim/Rob/All, > > Being a Perl nubieand not having alot of experience in installing and > using Perl modules...I decided to go the route of using the system > function.. > > I took a look at CPAN and what was involved in installing the module and > using it (was confuse

RE: copying a file without using module File::Copy

2003-02-14 Thread Jenda Krynicky
From: Paul <[EMAIL PROTECTED]> > > system ('copy d:\server\vsiwork\*.tag d:\server\vsiout'); > > Since you're obviously on a WinDOZE system, though, make sure you > don't use doublequotes around file paths; "d:\server\vsiwork\*.tag" > interpolates the backslashes, so you end up with a string that

RE: copying a file without using module File::Copy

2003-02-14 Thread Paul
> system ('copy d:\server\vsiwork\*.tag d:\server\vsiout'); btw, for security reasons, you might want to consider converting that to system qw/ copy d:\server\vsiwork\*.tag d:\server\vsiout /; or to be more visually explicit for nuB's, system ('copy','d:\server\vsiwork\*.tag','d:\server\vsio

RE: copying a file without using module File::Copy

2003-02-14 Thread Paul
--- Jenda Krynicky <[EMAIL PROTECTED]> wrote: > > Being a Perl nubieand not having alot of experience in > > installing and using Perl modules... > > While this may be a valid reason not to use a module it's not > applicable to File::Copy. > The module is

Re: copying a file without using module File::Copy

2003-02-14 Thread Rob Dixon
gt; in the code... > > While this may be a valid reason not to use a module it's not > applicable to File::Copy. > The module is part of the core, you already have it! Just like > anybody else. This is why we were asking, Mike. Its extremely common for people to decide on a solu

RE: copying a file without using module File::Copy

2003-02-14 Thread Jenda Krynicky
was involved in installing the module > and using it (was confused)...looked pretty involved..at least for me, > rather than just putting: > > system ('copy d:\server\vsiwork\*.tag d:\server\vsiout'); > > in the code... While this may be a valid reason not to use a m

RE: copying a file without using module File::Copy

2003-02-14 Thread wiggins
> > in the code... > For your future reference File::Copy comes as a base module on Perl starting at least as early as 5.6.1 so you shouldn't have to worry about installing it. If I remember correctly you are running an older version? Any of the gurus know when it was introduced as

RE: copying a file without using module File::Copy

2003-02-14 Thread Michael Pastore
PROTECTED] Subject: Re: copying a file without using module File::Copy Timothy Johnson wrote: > If you don't mind, I think there are still some of us that are > wondering; why don't you want to use File::Copy? Hear hear! /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: copying a file without using module File::Copy

2003-02-14 Thread Rob Dixon
Timothy Johnson wrote: > If you don't mind, I think there are still some of us that are > wondering; why don't you want to use File::Copy? Hear hear! /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: copying a file without using module File::Copy

2003-02-14 Thread Timothy Johnson
If you don't mind, I think there are still some of us that are wondering; why don't you want to use File::Copy? -Original Message- From: Michael Pastore [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 10:14 AM To: Michael Pastore; [EMAIL PROTECTED] Subject: RE: copy

RE: copying a file without using module File::Copy

2003-02-14 Thread Michael Pastore
: copying a file without using module File::Copy Hello All, Is the only way to copy a file from one directory to another by using the copy module...? Would anyone have a snipet of code copying a file from one dir to another... Any assistance would be appreciated... Thank you, Mike -- To

Re: copying a file without using module File::Copy

2003-02-14 Thread Rob Dixon
James Kipp wrote: >>> Is the only way to copy a file from one directory to another >>> by using the >>> copy module...? > > Sorry. I misread your question. Yeah, so did I :) > You could shell out to the system > copy as Wiggins mentioned. But why not use the module ? /R -- To unsubscribe, e

RE: copying a file without using module File::Copy

2003-02-14 Thread Kipp, James
> > > > Is the only way to copy a file from one directory to another > > by using the > > copy module...? Sorry. I misread your question. You could shell out to the system copy as Wiggins mentioned. But why not use the module ? > > one example: > --

RE: copying a file without using module File::Copy

2003-02-14 Thread Jensen Kenneth B SrA AFPC/DPDMPQ
inode field (from the stat function) is identical to the original. -Original Message- From: Michael Pastore [mailto:[EMAIL PROTECTED]] Sent: Friday, February 14, 2003 9:13 AM To: [EMAIL PROTECTED] Subject: copying a file without using module File::Copy Hello All, Is the only way to c

RE: copying a file without using module File::Copy

2003-02-14 Thread Kipp, James
> > Is the only way to copy a file from one directory to another > by using the > copy module...? > > Would anyone have a snipet of code copying a file from one > dir to another... > > Any assistance would be appreciated... > Have you checked the docs

RE: copying a file without using module File::Copy

2003-02-14 Thread wiggins
the new file for writing, read the contents of the read file and print to the write file, close both files. But why would you want to do that? Is there a particular reason for avoiding File::Copy? http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

copying a file without using module File::Copy

2003-02-14 Thread Michael Pastore
Hello All, Is the only way to copy a file from one directory to another by using the copy module...? Would anyone have a snipet of code copying a file from one dir to another... Any assistance would be appreciated... Thank you, Mike -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Re: file to file copy

2002-10-16 Thread Rob
refine it and demonstrate TMTOWTDI once more. Cheers all, and bonne chance R - Original Message - From: "folschette" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, October 16, 2002 9:24 AM Subject: Re: file to file copy > hi again, > > i've go

Re: file to file copy

2002-10-16 Thread Jean Padilla
t;> I'm not sure about your 'some text'. If you're allowing comment lines > >> starting with a hash then > >> > >> next if /^#/; > >> > >> at the start of the inner loop will do. Now if you want the comments > >> retaining

Re: file to file copy

2002-10-16 Thread folschette
ou're allowing comment lines >> starting with a hash then >> >> next if /^#/; >> >> at the start of the inner loop will do. Now if you want the comments >> retaining, that's another matter :)) >> >> I never like posting just a solut

Re: file to file copy

2002-10-16 Thread folschette
27;s another matter :)) > > I never like posting just a solution on the beginners' group, but I don't > think I'm doing anything obscure here that needs explaining. Tell me if > I'm wrong. > > HTH. > > Cheers, > > Rob > > - Original Messag

Re: file to file copy

2002-10-15 Thread folschette
thanx a lot for your help rob!! the idea with the hash.so simple! christophe folschette Rob wrote: > Christophe > > I think using Tie::File is overkill here. Try this: > > # Merge the two files into a single hash > # > for $file ( 'file2.dat', 'file1.dat' ) > { > open

Re: file to file copy

2002-10-15 Thread Rob
I'm doing anything obscure here that needs explaining. Tell me if I'm wrong. HTH. Cheers, Rob - Original Message - From: "folschette" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 15, 2002 10:56 AM Subject: file to file copy >

file to file copy

2002-10-15 Thread folschette
hello, i have to write a perl script which copies text from one file to another but only if the text is not exisiting yet. For example: in file1: word: moon word2: sky ... the same syntax for every line in file2: #some text word: honey word3: lol word4: mu ... as well the same syntax for every

Re: File::Copy question

2002-10-07 Thread John W. Krahn
Steve wrote: > > I am using Windows 98 and ActiveState Perl. I have a log file that after a > certain size is truncated and reused. I have written a simple script to > copy that file to another file using File::Copy. Is there a way to make > sure the second file is appe

RE: File::Copy question

2002-10-07 Thread Timothy Johnson
Sorry for not explaining better. See commments below. -Original Message- From: Mat Harris [mailto:[EMAIL PROTECTED]] Sent: Monday, October 07, 2002 7:24 AM To: Timothy Johnson Cc: 'Steve'; [EMAIL PROTECTED] Subject: Re: File::Copy question if you want to append to a second

  1   2   >