![]() |
problem cp
how to make a function cp
who would go like I read the name of the old file I it copis in a variable $variable I re-elect the new file and I copy it towards the old file while keeping the same name of the file |
Re: problem cp
john.swilting wrote:
> how to make a function cp > who would go like > I read the name of the old file I it copis in a variable $variable I > re-elect the new file and I copy it towards the old file while keeping the > same name of the file en français je lis le nom de l'ancien fichier je le copis dans une variable $variable je renomme le nouveau fichier et je le copie vers l'ancien fichier tout en gardant le meme nom du fichier |
Re: problem cp
john.swilting wrote:
> how to make a function cp > who would go like > I read the name of the old file I it copis in a variable $variable I > re-elect the new file and I copy it towards the old file while keeping the > same name of the file why not open (FH , $old_fichier); select(FH); rename $new_fichier, $old_fichier; `cp $new_ficier /image1` its nice that |
Re: problem cp
john.swilting wrote:
> john.swilting wrote: > >> how to make a function cp >> who would go like >> I read the name of the old file I it copis in a variable $variable I >> re-elect the new file and I copy it towards the old file while keeping >> the same name of the file > why not > > open (FH , $old_fichier); > select(FH); > rename $new_fichier, $old_fichier; > `cp $new_ficier /image1` > > its nice that not open (FH , $old_file); select(FH); rename $old_file ,$new_file; `cp $new_file /image1`; I had to reverse the files in the rename |
Re: problem cp
Michele Dondi wrote:
> On Fri, 23 Feb 2007 12:54:05 +0100, "john.swilting" > <john.swilting@wanadoo.fr> wrote: > >>open (FH , $old_fichier); >>select(FH); >>rename $new_fichier, $old_fichier; >>`cp $new_ficier /image1` >> >>its nice that > > IMHO you want either to do it all in Perl or use OS native commands > altogether. Personally, I would perfer the former. > > > Michele ok File::* all its nice |
Re: problem cp
Abigail wrote:
> Michele Dondi (bik.mido@tiscalinet.it) wrote on MMMMCMXXIV September > MCMXCIII in <URL:news:vtntt2ptjjljafukbpp1bsiqse57i1vbg0@4ax.c om>: > && On Fri, 23 Feb 2007 12:54:05 +0100, "john.swilting" > && <john.swilting@wanadoo.fr> wrote: > && > && >open (FH , $old_fichier); > && >select(FH); > && >rename $new_fichier, $old_fichier; > && >`cp $new_ficier /image1` > && > > && >its nice that > && > && IMHO you want either to do it all in Perl or use OS native commands > && altogether. Personally, I would perfer the former. > > > I very much prefer the latter. > > > > Abigail why |
Re: problem cp
john.swilting wrote:
> Abigail wrote: > >> Michele Dondi (bik.mido@tiscalinet.it) wrote on MMMMCMXXIV September >> MCMXCIII in <URL:news:vtntt2ptjjljafukbpp1bsiqse57i1vbg0@4ax.c om>: >> && On Fri, 23 Feb 2007 12:54:05 +0100, "john.swilting" >> && <john.swilting@wanadoo.fr> wrote: >> && >> && >open (FH , $old_fichier); >> && >select(FH); >> && >rename $new_fichier, $old_fichier; >> && >`cp $new_ficier /image1` >> && > >> && >its nice that >> && >> && IMHO you want either to do it all in Perl or use OS native commands >> && altogether. Personally, I would perfer the former. >> >> >> I very much prefer the latter. >> >> >> >> Abigail > why I do not know how I will program the change image to order. on sale |
Re: problem cp
Abigail wrote:
> use File::Copy; > copy $file => $destination; > > needs two lines just to copy one file, is broken, is hopelessly inflexible, > and will delete your files if you think 'copy' might mimic the 'cp' command. Huh? Just how can copy() cause the input file to be deleted? -Joe |
| All times are GMT. The time now is 12:18 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.