copy subarray

2008-03-07 Thread Philipp Knechtle
Hi I am working with subarrays in a main array. When I copy the main array: my @mainarray = ([1,2,3],[4,5,6],[7,8,9]) my @arraytwo = @mainarray the references get copied. When I then modify the subarray data in @arraytwo they are of course also modified in @mainarray. So I use the

Re: copy subarray

2008-03-07 Thread Chas. Owens
On Fri, Mar 7, 2008 at 5:10 AM, Philipp Knechtle <[EMAIL PROTECTED]> wrote: > Hi > I am working with subarrays in a main array. When I copy the main array: > > my @mainarray = ([1,2,3],[4,5,6],[7,8,9]) > my @arraytwo = @mainarray > > the references get copied. When I then modify the subarray da

Re: how to iterate through a list of files in a directory and compare them to an index.

2008-03-07 Thread Chas. Owens
On Fri, Mar 7, 2008 at 2:00 AM, Angus Glanville <[EMAIL PROTECTED]> wrote: snip > It seems like the all the > contents of the file index are run against one iteration of the > directory contents then it quits. snip > opendir (PDFDIR, $pdf_dir) || die "Can't open $pdf_dir: $!\n"; > > while (my

Re: how to iterate through a list of files in a directory and compare them to an index.

2008-03-07 Thread Gunnar Hjalmarsson
Angus Glanville wrote: I have an index.txt file that contains two values separated by a pipe symbol like this: junk_file_test1|test1.pdf junk_file_test2|test2.pdf I slurp the file in, That not what you do in the code you posted. open a directory handle and try to compare the value t

Re: copy subarray

2008-03-07 Thread Jeff Pang
In python or C++ there is a concept called "deep copy". try to search that keyword on cpan, like this one: http://search.cpan.org/~stevan/Class-Cloneable-0.03/lib/Class/Cloneable.pm On Fri, Mar 7, 2008 at 6:10 PM, Philipp Knechtle <[EMAIL PROTECTED]> wrote: > Hi > > > > I am working with subarray

Re: copy subarray

2008-03-07 Thread Jenda Krynicky
From: "Philipp Knechtle" <[EMAIL PROTECTED]> To: > I am working with subarrays in a main array. When I copy the main array: > > my @mainarray = ([1,2,3],[4,5,6],[7,8,9]) > my @arraytwo = @mainarray > > the references get copied. When I then modify the subarray data in > @arraytwo they are

Re: how to iterate through a list of files in a directory and compare them to an index.

2008-03-07 Thread John W. Krahn
Angus Glanville wrote: Hi, Hello, I here is a sample of the problem I am trying to solve. I have an index.txt file that contains two values separated by a pipe symbol like this: junk_file_test1|test1.pdf junk_file_test2|test2.pdf I slurp the file in, open a directory handle and tr

Re: copy subarray

2008-03-07 Thread John W. Krahn
Philipp Knechtle wrote: Hi Hello, I am working with subarrays in a main array. When I copy the main array: my @mainarray = ([1,2,3],[4,5,6],[7,8,9]) my @arraytwo = @mainarray the references get copied. When I then modify the subarray data in @arraytwo they are of course also modified in @ma

Re: FTP server

2008-03-07 Thread Michael Iatrou
When the date was Thursday 06 March 2008, Octavian Rasnita wrote: > Can anyone recommend a good FTP server for Linux? > I want to be able to create/delete users dynamicly from a perl program, > assign permissions dynamicly, and it would be good (although not > absolutely necessary) to have SSL sup

Re: how to iterate through a list of files in a directory and comparethem to an index.

2008-03-07 Thread Gunnar Hjalmarsson
John W. Krahn wrote: Angus Glanville wrote: My final goal is to normalize the names so that they are the same case on the file system as indicated in the index file. You probably need to use the -e (exists) file test operator: while ( my $line = ) { chomp $line; my ( $raw_na

Re: FTP server

2008-03-07 Thread Francisco Valladolid
Hi. http://vsftpd.beasts.org/ if you are paranoic then try using the OpenSSH suite, by setting a sftp server, or via scp, chrotting ssh., if not then vsftpd, pureftpd, can resolv this question. Regards. On Fri, Mar 7, 2008 at 12:15 PM, Thomas Bätzler <[EMAIL PROTECTED]> wrote: > Octavian Ras