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
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
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
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
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
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
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
>
>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
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
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
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
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
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
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
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
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
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
;
>
> 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,
> > >
>
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
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
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
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
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.
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
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
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_
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
> 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
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
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
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
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
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
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 ->
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
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
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
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
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>
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:]
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
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
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
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
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
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
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
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
--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)
--- 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
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
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
')
>
> > 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
#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
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:
--- 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
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
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
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
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
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
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:
- 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
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
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
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
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'
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
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
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
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
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
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
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
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
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
> 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
--- 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
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
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
>
> 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
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
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]
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
: 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
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
> >
> > 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:
> --
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
>
> 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
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]
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
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
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
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
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
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
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
>
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
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
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 - 100 of 144 matches
Mail list logo