Re: file locking before move?

2002-11-16 Thread smoot
> "Rory O'Connor" <[EMAIL PROTECTED]> said: > I am using File::Copy to move a file from one directory to another. However, I do >not want to move the file if it is being written to (by another program). > > Do i need to lock the file before moving it or does File::Copy by nature wait until >

Re: HOW DO I INSTALL DBI/DBD Modules on Solaris 8

2002-11-16 Thread Thanatos
Charles Idonije wrote: I need help installing DBI & DBD Modules on a server running Solaris 8.There are multiple instances of perl installed on this server. The question is how do I install DBI and DBD to point to a particular instance of perl. For example /apps/bin/perl. Thanks, [EMAIL PROTECTE

Re: Separating a scalar for searching

2002-11-16 Thread Wiggins d'Anconia
perldoc -f split perldoc perlretut You can use split on the comma character to get the individual fields in list context (store to an array or hash for example) and then step through the list searching on each. Or possibly a better approach if your data will allow it, search on the whole line a

Separating a scalar for searching

2002-11-16 Thread Albert L. Lukaszewski
I am developing a search engine for a database I use. The database is static and consists of comma delimited files. After reading the text line-by-line into a scalar, I would like to analyze the data by field. How could I separate the fields or, at least, analyze them separately against a search

file locking before move?

2002-11-16 Thread Rory O'Connor
I am using File::Copy to move a file from one directory to another. However, I do not want to move the file if it is being written to (by another program). Do i need to lock the file before moving it or does File::Copy by nature wait until a file is not being written to before moving? I lo

cross-thread: this applies to storing hashes of hashes

2002-11-16 Thread Paul
--- Paul <[EMAIL PROTECTED]> wrote: > > --- Tom Allison <[EMAIL PROTECTED]> wrote: > > My first guess is to use "tie" to access a file of type DB_File. > > The number of records is small <1000 but the record structure is > > going to be either a hash of hashes, hash of arrays, or similar. > > O

Re: Data Access

2002-11-16 Thread Paul
--- Tom Allison <[EMAIL PROTECTED]> wrote: > My first guess is to use "tie" to access a file of type DB_File. > The number of records is small <1000 but the record structure is > going to be either a hash of hashes, hash of arrays, or similar. One possible solution depends on your data structure

Re: Array problem, I think

2002-11-16 Thread Paul Johnson
On Mon, Nov 11, 2002 at 06:17:58PM -0500, Cacialli, Doug wrote: > I've got oodles of data. It looks like this: > > 0 @F1@ FAM > 1 HUSB @I13@ > 1 WIFE @I14@ > 1 CHIL @I8@ > 0 @F2@ FAM > 1 HUSB @I10@ > 1 WIFE @I8@ > 1 CHIL @I11@ > 1 CHIL @I12@ > etc. [ snip problem ] > I'm familiar with substr,

Re: Write hash of hashes to disk?

2002-11-16 Thread Steve Grazzini
Matt Simonsen <[EMAIL PROTECTED]> wrote: > I've tried using DB_File open a hash and write a hash of hashes to disk, > but this failed. I read in Perl Cookbook to "just use it as a regular > hash" but from what I can tell this is not possible when speaking of > complex structures like a hash of hash

Use of Search::Dict

2002-11-16 Thread Tin-Shan Chau
Can anyone point me to an example of how to use the above module? The ActiveState documentation is, to say the least, cryptic. I looked at "The PERL Cookbook", "PERL Programming", and also tried using PERLDOC, but did not come up with anything. Some of my questions are: 1. How should the inpu

Data Access

2002-11-16 Thread Tom Allison
I have an application that needs to attach to some data which it is running. I initially started by using Storable.pm and see a potential problem with data synchronization between different applications running. I think I need to change this to another type of data IO method. My first guess is

Re: Array problem, I think

2002-11-16 Thread badchoice
> 0 @F1@ FAM > 1 HUSB @I13@ > 1 WIFE @I14@ > 1 CHIL @I8@ > 0 @F2@ FAM > 1 HUSB @I10@ > 1 WIFE @I8@ > 1 CHIL @I11@ > 1 CHIL @I12@ > etc. $/ = undef; for (split /\n0/, <>) { ($key) = /\@(..)/; $hash{$key} = [ /\@(\w+)\@$/gm ]; } > $individuals{"F1"}[0] = "I13"; > $individuals{"F1"

Re: Reading System-Variables

2002-11-16 Thread Sudarshan Raghavan
On Fri, 15 Nov 2002, Ano Nymus wrote: > Hi, > > the call > > $name = system"uname -a"; perldoc -f system system returns the exit status of the command. You need to use backticks or the qx operator $name = `uname -a`; Better still take a look at the Config module perldoc Config Avoid backticks

Re: about updating Perl and keeping the installed modules

2002-11-16 Thread kj
In article <004d01c28ceb$49259c40$a164a8c0@efreyre>, [EMAIL PROTECTED] (Ernesto Freyre) wrote: > HI !, Please could someone tell me how I can to update my Perl 5.005 to Perl > 5.8 and keeping the modules installed currently? Or none problem related to > modules exists atn updating?. > > Thank y