Re: tempfile permissions

2004-07-24 Thread Gunnar Hjalmarsson
Sean Davis wrote: I am writing a file (created using File::Temp) to a directory in my webserver documents directory. I cannot access it from my script afterwards. It is a graphic created by the script that I then want to display in an html page. I don't believe you when you say that you cannot

Re: tempfile permissions

2004-07-24 Thread Gunnar Hjalmarsson
Zentara wrote: Then after the file is successfully created, make sure it is world-readable.usually mode 755. But most systems are setup with a default filemask set, to create files as mode 644 as default. So after you create your file, do a chmod on it to make sure its 755. $r_file = 'z';

Re: execute code in event of KILL

2004-07-24 Thread John W. Krahn
Harry Putnam wrote: I want to build something into a perl program that acts like the `trap' operator in shell scripts. Checking perldoc -q trap gives some confusing info (confusing to me anyway). So it wasn't clear to me if it can be done or what. It also points you to the perlipc document which

Re: Count the occurence of a character

2004-07-24 Thread David Storrs
On Fri, Jul 23, 2004 at 12:13:48PM +0200, Paul Johnson wrote: On Fri, Jul 23, 2004 at 03:12:22PM +0530, Jaffer Shaik wrote: I have the below strig $str = abckdweqadidkisdikda; In the above string, I want to count the occurrences of character 'a', i.e I should get count of a =

Re: Count the occurence of a character

2004-07-24 Thread John W. Krahn
David Storrs wrote: On Fri, Jul 23, 2004 at 12:13:48PM +0200, Paul Johnson wrote: On Fri, Jul 23, 2004 at 03:12:22PM +0530, Jaffer Shaik wrote: I have the below strig $str = abckdweqadidkisdikda; In the above string, I want to count the occurrences of character 'a', i.e I should get count of a

Trying to understand sort and anonymous sub

2004-07-24 Thread Dalton Marris
I am trying to understand the use of sub in the second foreach $daynum loop in the code shown below. I know it's an anonymous sub, but can't figure out why it's needed, if it indeed is. I have read the perlref and perlsub documents, and googled for information, to no avail. Some things I

Re: Trying to understand sort and anonymous sub

2004-07-24 Thread Paul Johnson
On Sat, Jul 24, 2004 at 08:57:56AM -0400, Dalton Marris wrote: I am trying to understand the use of sub in the second foreach $daynum loop in the code shown below. I know it's an anonymous sub, but can't figure out why it's needed, if it indeed is. I have read the perlref and perlsub

Multiple Parameters

2004-07-24 Thread mafioso1823
I am trying to write a search and replace script that can accept multiple arguments, but i want the first argument to be the filename to read, the next one to be the string to search for, the next one to be the replacement string, and the last one to be the name of the new file it creates with the

Help required with DBI

2004-07-24 Thread NandKishore.Sagi
Hi All , I need some help with DBI. This is the first time I am working with DBI module and am pretty new to perl too. I am trying to connect to a database to execute some queries. I had written a code which is shown below (It is actually a partial code for just connecting to database).

Re: Help required with DBI

2004-07-24 Thread David Dorward
On Sat, 2004-07-24 at 19:14, NandKishore.Sagi wrote: $data_source = dbi:DriverName:database_name ; Can't locate DBD/DriverName.pm in Change DriveName to the name of the driver you want to use (e.g. mysql) Change database_name to the name of the database you want to use. -- David Dorward

Re: Multiple Parameters

2004-07-24 Thread James Edward Gray II
On Jul 24, 2004, at 11:38 AM, [EMAIL PROTECTED] wrote: I am trying to write a search and replace script that can accept multiple arguments, but i want the first argument to be the filename to read, the next one to be the string to search for, the next one to be the replacement string, and the

Errors installing modules on Solaris 9

2004-07-24 Thread JR Miller
New to loading PERL modules and can't figure this one out. Running Solaris 9 with current patches, PERL is v5.6.1 built for sun4-solaris-64int. Most modules I try to install bomb out with the same errors as the following ERROR TEXT. Using gmake and have installed gcc as well (both are in my