A Dissabte 19 Agost 2006 09:19, I BioKid va escriure:
> I have a simple - yet trivial problem -
>
> I 2000 directory at /home2/foo/foodir/ .
> I need to copy all files with extension *.atm and *.ali to another
> directory called temp (say  /home2/foo/foodir/temp )
> After that I need to run a program in each of this directory - (say joy
> *.ali )
> If am suppose to do it it will take a hell lot of time - so I have written
> a small perl
> script - but am not able to get what i need ...
> Here is my script :
>
> @a=`cat list`;
> foreach $a(@a)
>         {
>         `mkdir $a`;
> # it is working fine up to this end -
>         `cd $a`;
>         `cp ../../$a/ *.ali .`;
>         `cp ../../$a/ *.atm .`;
>         }
> am getting error / warning like this
>
> cp: missing destination file
> Try `cp --help' for more information.
> sh: /: is a directory
> but when am doing it manualy all the comments are working fine
>
> Please help me with some inputs -

this is not a perl error, but system error;  warning says the cp instruction 
you wrotte in within the block isn't correct. that's what you've to handle 
first (see cp info).
-- 
Xavier Mas

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to