RE: Setting environment variable for process spawned with system()

2002-07-18 Thread Dan Fish
Yup... That worked just great! Thanks Jenda! -Dan -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 17, 2002 10:33 AM To: Perl List Subject: Re: Setting environment variable for process spawned with system() From: "Dan Fish" <[EMAIL PROTECTED]>

ps -ef under AIX Unix

2002-07-18 Thread Hughes, James
Hi there perl people of the world. I was wondering if anyone had a way to assign the process list from Unix to an array using perl internals, not the old " @PSINFO=`ps -ef`; " system call. Thanx bunches! Jim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

maximum column length

2002-07-18 Thread Konrad Foerstner
Heyho! My case: I'm writing a program which analyses some input to get some percent values. These values should be drawn in a diagramm (is use GD for that). To use the area of the created picture optimally I want the biggest value (see my question of yesterday...it is solved now) to have colu

problem with djgpp/perl

2002-07-18 Thread Alessandro Di Bella
Hi, I'm not sure if mailing to this list is the right way of getting help, if not I apologize in advance. I'm trying to write a client for dos that talk to a java servlet and given all the libraries available for perl I decided to use djgpp/perl. This is what I did: 1. I downloaded perl542b.zip an

Re: ps -ef under AIX Unix

2002-07-18 Thread drieux
On Thursday, July 18, 2002, at 02:26 , Hughes, James wrote: > Hi there perl people of the world. I was wondering if anyone had a way to > assign the process list from Unix to an array using perl internals, not > the > old " @PSINFO=`ps -ef`; " system call. you will probably want to a) opt in

Re: Flat File Db

2002-07-18 Thread Jenda Krynicky
From: George Schlossnagle <[EMAIL PROTECTED]> > >> The main problem appears to be that instead of taking a different > >> branch if open() or flock() fails you continue on as if they had > >> succeeded. > > flock($fh,LOCK_EX ) is a blocking call, so it won't return until the > l

Re: maximum column length

2002-07-18 Thread Connie Chan
> to have column with the maximum lenght (in my case 580 pixels). What is length refer to ? I mean, the width or height ? > All the other values should be drawn in relation to that. So what is the relation ? Is that the "length" is $max_percent_value or what ? > I thougt I can make a factor a

Re: Flat File Db

2002-07-18 Thread drieux
On Wednesday, July 17, 2002, at 07:04 , George Schlossnagle wrote: >>> The main problem appears to be that instead of taking a different branch >>> if open() or flock() fails you continue on as if they had succeeded. > > flock($fh,LOCK_EX ) is a blocking call, so it won't return until the lock

Confirm a possible bug

2002-07-18 Thread Nikola Janceski
I think I have stumbled onto a bug. I'd like one of the gurus (Jeff, druiex, Jenda or any perlguy.com) to confirm that my test is correct or if I missed something in docs. using Perl 5.6.1 on a Solaris sparc. #perl use strict; use warnings; my $wofile = "noread"; # text file with no read permis

Re: Confirm a possible bug

2002-07-18 Thread Michael Lamertz
On Thu, Jul 18, 2002 at 10:33:45AM -0400, Nikola Janceski wrote: > I think I have stumbled onto a bug. I'd like one of the gurus (Jeff, druiex, > Jenda or any perlguy.com) to confirm that my test is correct or if I missed > something in docs. I'm not on that list, but I'll bite anyways :-) > usi

Re: Confirm a possible bug

2002-07-18 Thread Jeff 'japhy' Pinyan
On Jul 18, Nikola Janceski said: >I think I have stumbled onto a bug. I'd like one of the gurus (Jeff, druiex, >Jenda or any perlguy.com) to confirm that my test is correct or if I missed >something in docs. I have confirmed the same result. The -T test on a file with no read permissions causes

Re: Confirm a possible bug

2002-07-18 Thread Michael Lamertz
On Thu, Jul 18, 2002 at 04:53:46PM +0200, Michael Lamertz wrote: > > The 'stat' structure is used. That structure has been filled by the -T, > since the file has been accessed, regardless of the fact that the test > for the 'text' type failed. DUH! Me Idiot, Ugh! I mixed up || and && in my ow

Re: Confirm a possible bug

2002-07-18 Thread George Schlossnagle
It appears that -T cause perl to avoid doing the stat, opting for open and fstat instead (so that it can check the file header to see if it's text). The open of course fails, and thus the stat does not get populated. On Thursday, July 18, 2002, at 11:04 AM, Michael Lamertz wrote: > On Thu,

Perl compiler

2002-07-18 Thread Cleiton L. Siqueira
Dear, I've tried to compile a script perl through perlcc, but it has returned me the following error: bash-2.04# perlcc teste.pl Compiling teste.pl: --

Re: Random generator

2002-07-18 Thread drieux
On Wednesday, July 17, 2002, at 09:29 , Nikola Janceski wrote: > you for got the int.. he said whole numbers > > my $rand_num = int(rand(90) + 10); > good point! I had forgotten to be explicit that we wanted an int... eg: my $int = 10; my $count = rand($int) + $int;

Re: exec statement

2002-07-18 Thread Maureen E Fischer
Thank you Bob, This works for me. One further question. I thought I read somewhere that you should not put full paths in a CGI program for security reasons. Should that be a consideration? Maureen Bob Showalter wrote: > > -Original Message- > > From: Maureen E Fischer [mailto:[EM

Re: Confirm a possible bug

2002-07-18 Thread Jeff 'japhy' Pinyan
On Jul 18, George Schlossnagle said: >It appears that -T cause perl to avoid doing the stat, opting for open >and fstat instead (so that it can check the file header to see if it's >text). The open of course fails, and thus the stat does not get >populated. That's exactly what I found. My patc

Re: exec statement

2002-07-18 Thread Roger Morris
At 08:28 AM 7/18/2002 -0700, Maureen E Fischer wrote: >Thank you Bob, > This works for me. One further question. I thought I read somewhere >that you should >not put full paths in a CGI program for security reasons. Should that be a >consideration? >Maureen For security, you should put ful

scope of perlvars?

2002-07-18 Thread Nikola Janceski
I was wondering what the scope of perlvars (ie. $! and $?) are across modules? Here's my situation: In module: open file || return -1; In script: Can I use $! here? and will it contain the reason open didn't open (if it didn't) in the module? Would I need to export the $! from the module? Nik

Re: scope of perlvars?

2002-07-18 Thread Jeff 'japhy' Pinyan
On Jul 18, Nikola Janceski said: >I was wondering what the scope of perlvars (ie. $! and $?) are across >modules? Those variables are true globals. They are seen everwhere. >In module: >open file || return -1; > >In script: >Can I use $! here? and will it contain the reason open didn't open (i

Re: maximum column length

2002-07-18 Thread Wiggins d'Anconia
Possible need for integer forced math? I am not familar enough with GD to know if this would help, but when doing a similar thing with web-based on the fly generation of graphs simply supplying a length of 460.3 on an image's attributes for instance sent the browser into a tizzy. Konrad Foe

DBI problem

2002-07-18 Thread Qingjuan Gu
Hi, In my perl-5.6.1, I installed DBI-1.29, when I run the perl script to connect mysql database, the following error is given: Can't locate loadable object for module DBI in @INC (@INC contains: /compbio/programs/perl-5.6.1/lib/5.6.1/alpha-dec_osf /compbio/programs/perl-5.6.1/lib/5.6.1 /comp

RE: DBI problem

2002-07-18 Thread nkuipers
Try reinstalling the module perhaps. Did you use automated installation or manual? Were there ANY problems with the install. Are you SURE you installed it to the appropriate directory structure for referencing? I work in 5.6.0 and use the DBI module bundled with it; are there bug reports fo

Extracting attachments from emails

2002-07-18 Thread Steve Gilbert
Does anyone have a suggestion for extracting file attachments from emails? I need to setup a process that pulls data from an email and then moves the data and starts another process. Any help would be great! Thanks, Steve __ Do You Yahoo!? Yahoo!

RE: DBI problem

2002-07-18 Thread Qingjuan Gu
Hi nathanael, I use perl5.6.1(symbolic link to perl) Makefile.PL, make, make test, make install to install DBI-1.29, I am attaching the results of installation. BTW, do you know how to install these modules. When I install Msql-Mysql-1.2219.tar.gz, there is failed message when I 'make test': #

Re: DBI problem

2002-07-18 Thread drieux
On Thursday, July 18, 2002, at 09:54 , Qingjuan Gu wrote: > Hi, > > In my perl-5.6.1, I installed DBI-1.29, when I run the perl script to > connect mysql database, the following error is given: > > Can't locate loadable object for module DBI in @INC (@INC contains: > /compbio/programs/perl-5.6

Re: Extracting attachments from emails

2002-07-18 Thread Kevin Meltzer
I use MIME::Parser, and have always loved it. It will extract attachments to files, and you can do what you want with them. For example: use MIME::Parser; my $message = ; $parser->output_dir('/some/directory'); my $entity = $parser->parse_data(\$message); At this point, attachments should hav

Re: Extracting attachments from emails

2002-07-18 Thread Wiggins d'Anconia
On a side note and out of laziness (I know RTFM) Does MIME::Parser handle recursive attachments?? We attempted to home grow a parser a couple of years ago (I realize a lot has changed since then) but were always trapped by multiple attachments inside an attachment, etc. which for whatever

Re: Extracting attachments from emails

2002-07-18 Thread Kevin Meltzer
If you mean when an attachment is a mail message with attachments... yes. Cheers, Kevin On Thu, Jul 18, 2002 at 01:33:21PM -0400, Wiggins d'Anconia ([EMAIL PROTECTED]) said something similar to: > On a side note and out of laziness (I know RTFM) > > Does MIME::Parser handle recursive attac

Help starting out....

2002-07-18 Thread David Fisher
Ok, I need to ask you guys for some help and advice. I am working on learning Perl, but am having a hard time. I am very familiar with C++, but Perl seems a lot more complex for some reason. I currently have CGI Programming with Perl from O'Reilly, and Using Perl 5 for Web Programming from Que pu

Re: Help starting out....

2002-07-18 Thread Wiggins d'Anconia
The Camel. Having said that it might be to high as well. Check out learning perl. Here are the two links (the books are available at most decent sized book stores and definitely from the online retailers). http://www.oreilly.com/catalog/pperl3/ -> The Camel 3rd Edition http://www.oreilly.com/c

Re: Help starting out....

2002-07-18 Thread Tanton Gibbs
Since you're having problems with decidedly Perl things, you need to back up and lower the bar some. First, you need to just concentrate on Perl. Buy Learning Perl and Programming Perl from Oreilly, they are excellent books (only buy the second after you understand the first). Then, try writing

perl graphics editing

2002-07-18 Thread David Gerler
Hi, I have searched cpan using ppm looking for a package to use. I would like to write a script to edit the size of jpg's. Is there a package out there or even a script out there that will help me with this? I have about 2500 images that I need to resize to make them thumbs. That'

Re: perl graphics editing

2002-07-18 Thread Wiggins d'Anconia
Don;t know if this is still the *right* way to do things, but Image::Magick was always my favorite. Basically you read the file, set the attributes, and then write the file back out. David Gerler wrote: > Hi, > I have searched cpan using ppm looking for a package to use. I would like >

Msql-Mysql-modules-1.2219 test problem

2002-07-18 Thread Qingjuan Gu
Hello everybody, When I install Msql-Mysql-modules-1.2219.tar.gz, there is error message for 'make test', which make my perl script can not run. This interactive results when I install Msql-Mysql-modules-1.2219: # perl5.6.1 Makefile.PL Which drivers do you want to install? 1) MySQL only

RE: Help starting out....

2002-07-18 Thread Kipp, James
> > Ok, I need to ask you guys for some help and advice. > I am working on learning Perl, but am having a hard time. I am very > familiar with C++, but Perl seems a lot more complex for some reason. > I currently have CGI Programming with Perl from O'Reilly, and > Using Perl > 5 for Web Program

Re: Extracting attachments from emails

2002-07-18 Thread John W. Krahn
Kevin Meltzer wrote: > > At this point, attachments should have been parsed out and created in > $INCOMING_DIR. Use $entity to fondle the rest of the message as you > want. Much more info in the docs. Fondling mails Kevin? That doesn't sound very appealing. :-) John -- use Perl; program ful

Re: Extracting attachments from emails

2002-07-18 Thread Kevin Meltzer
It's still legal in 23 states! Honest! Cheers, Kevin On Thu, Jul 18, 2002 at 12:33:28PM -0700, John W. Krahn ([EMAIL PROTECTED]) said something similar to: > Kevin Meltzer wrote: > > > > At this point, attachments should have been parsed out and created in > > $INCOMING_DIR. Use $entity to fon

Re: perl graphics editing

2002-07-18 Thread Matt Simonsen
This isn't a Perl solution (unless you run it from a perl script...) but it'll work. Use mogrify, part of the imagemagic software suite one command will do the whole trick. Matt On Thu, 2002-07-18 at 11:56, David Gerler wrote: > Hi, > I have searched cpan using ppm looking for a packag

RE: perl graphics editing

2002-07-18 Thread David Gerler
Thanks to all that gave the info. Seems that ImageMagik is the winner hands down. :-) David Gerler Gerler Enterprises PO BOX 16357 Chesapeake VA 23328 http://www.GerlerEnterprises.com/ Nationwide Dial-up from $12.45 http://www.EasySitesForLess.com/ -Original Message- From: Matt Simonsen

Re: maximum column length

2002-07-18 Thread Konrad Foerstner
I also tried to use with "sprintf" to get integers and to avoid this problem. Doesn't work. On Thu, 18 Jul 2002 11:46:03 -0400 "Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote: > Possible need for integer forced math? I am not familar enough with GD > to know if this would help, but when doing

Re: maximum column length

2002-07-18 Thread Konrad Foerstner
I also tried to use with "sprintf" to get integers and to avoid this problem. Doesn't work. On Thu, 18 Jul 2002 11:46:03 -0400 "Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote: > Possible need for integer forced math? I am not familar enough with GD > to know if this would help, but when doing

populating hash from DBI

2002-07-18 Thread Scott Taylor
Hello, I'm having a heck of a time populating a hash from an SQL statement. Here is what I have so far (which doesn't work of course) my $SQL = qq[SELECT triid, numlegs from tri_id]; my $sth = $dbh->prepare($SQL); $sth->execute; no warnings 'uninitialized'; my %numlegs; while ( %numlegs = $s

Code Review/Mentoring session at TPC (reminder)

2002-07-18 Thread Peter Scott
Reminder: For those of you attending the Perl Conference #6 (or Open Source Conference), there is a golden opportunity to get some free coaching and consultation on your work. A Birds-of-a-Feather session on "Perl Mentoring/Code Reviews" will be given for the third year running. Some of the t

RE: populating hash from DBI

2002-07-18 Thread Bob Showalter
> -Original Message- > From: Scott Taylor [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 18, 2002 5:08 PM > To: [EMAIL PROTECTED] > Subject: populating hash from DBI > > > Hello, > > I'm having a heck of a time populating a hash from an SQL statement. > > Here is what I have so far

Re:maximum column length

2002-07-18 Thread Connie Chan
I forward this message to the list, so hope some others can help too.. > > > to have column with the maximum lenght (in my case 580 pixels). > > > > What is length refer to ? I mean, the width or height ? > > Is this important? Well, my columns start left an go to the right side. > So this pixel

Re: populating hash from DBI

2002-07-18 Thread Shawn
- Original Message - From: "Scott Taylor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 18, 2002 4:08 PM Subject: populating hash from DBI > Hello, Hello, > > I'm having a heck of a time populating a hash from an SQL statement. > > Here is what I have so far (whi

RE: populating hash from DBI

2002-07-18 Thread Scott Taylor
At 02:20 PM 18/07/2002, Bob Showalter wrote: >Each pass through the loop overwrites %numlegs, so it will only >contain one entry, corresponding to the last row. So I found. >You can do something like this: > >while (my $a = $sth->fetchrow_arrayref) { > $numlegs{$a->[0]} = $numlegs{$a-

Re: Help starting out....

2002-07-18 Thread drieux
On Thursday, July 18, 2002, at 11:35 , David Fisher wrote: [..] > I can find very little online oddly enough that doesn't seem over my > head on mySQL and Perl. Does anyone have a good beginner's tutorial on > mySQL and Perl? I understand simple file i/o, but it doesn't seem to > apply the same a

Re: maximum column length

2002-07-18 Thread Konrad Foerstner
> > to have column with the maximum lenght (in my case 580 pixels). > > What is length refer to ? I mean, the width or height ? Is this important? Well, my columns start left an go to the right side. So this pixel value is third value in the "filledRectangle" data. filledRectangle(100,90,$col

Re: maximum column length

2002-07-18 Thread Konrad Foerstner
I also tried to use with "sprintf" to get integers and to avoid this problem. Doesn't work. On Thu, 18 Jul 2002 11:46:03 -0400 "Wiggins d'Anconia" <[EMAIL PROTECTED]> wrote: > Possible need for integer forced math? I am not familar enough with GD > to know if this would help, but when doing

Re: maximum column length

2002-07-18 Thread Konrad Foerstner
Well, I tried now to round the percent values with "sprintf" befor give it for the column calculation and it seems to work. But this is very bad rounded. Which module I need for "round()"? cu KUF -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

How to get folder name of current script running?

2002-07-18 Thread chris
How to get folder name of current script running? This may or may not be the current active folder but the folder where the script is stored. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: maximum column length

2002-07-18 Thread Connie Chan
Maybe : round sprintf use POSIX use Math::Complex use Math::Trig I don't know which one can help, but they seems quite like what you need. Rgds, Connie - Original Message - From: "Konrad Foerstner" <[EMAIL PROTECTED]> To: "Connie Chan" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>

Re: How to get folder name of current script running?

2002-07-18 Thread Connie Chan
Dose $0 the thing you want ? Rgds, Connie - Original Message - From: "chris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 19, 2002 6:26 AM Subject: How to get folder name of current script running? > How to get folder name of current script running? > > This may or

Re: Msql-Mysql-modules-1.2219 test problem

2002-07-18 Thread drieux
On Thursday, July 18, 2002, at 11:51 , Qingjuan Gu wrote: > > t/ak-dbdDBD::mysql::st FETCH failed: statement contains no > result at t/ak-dbd.t line 286. you might want to open up that test, it is the file t/ak-dbd.t since you will be able to see at about line 286 which s

quotas

2002-07-18 Thread Mat Harris
hi, how can i edit a users' filesystem quota on redhat 7.3 from a perl script. i know that you can use the edquota program on the command line but that is an editor-style environment and thus would require an expect script. is there some command-line flags that work with edquota or anything to

Re: How to get folder name of current script running?

2002-07-18 Thread drieux
On Thursday, July 18, 2002, at 03:26 , chris wrote: > How to get folder name of current script running? ### #!/usr/bin/perl -w ### use strict; ### use File::Basename qw/dirname/; ### use Cwd; ### ### my $name = $0; ### my $dir = dirname $name; ### my $curdir= cwd; ### ### print $name . " is In

Opening and Writing to Files

2002-07-18 Thread Carrie Lyn Brammer
I've looked throgh the recent archives. A lot of what is being discussed seems too 'advanced' for me. I guess i'm a REAL baby newbie. Can someone please look at the following project, and tell me why it is not writing the contents of the readfile.txt to the writefile.txt? It's tough to learn

Re: How to get folder name of current script running?

2002-07-18 Thread John W. Krahn
Chris wrote: > > How to get folder name of current script running? > > This may or may not be the current active folder but the folder where > the script is stored. perldoc FindBin John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

Re: Opening and Writing to Files

2002-07-18 Thread Connie Chan
>> print (@contents); You have to print to the file handle, otherwise, nothing will write to WRITEFILE, but to screen only. So, you have to write as : print WRITEFILE @contents; >> @newcontents = ; >> print "\n The contents of writefile.txt is $newcontents \n"; No, $newcontents here will prin

Re: Opening and Writing to Files

2002-07-18 Thread Mat Harris
you need to add the name of the target filehandle when you write to it. for example: if you open writefile.txt with the filehandle WRITE, you must print to it like so: print WRITE "add some text"; At 18:18 18/07/2002 -0500, Carrie Lyn Brammer wrote: >I've looked throgh the recent archives. A

Re: Opening and Writing to Files

2002-07-18 Thread John W. Krahn
Carrie Lyn Brammer wrote: > > I've looked throgh the recent archives. A lot of what > is being discussed seems too 'advanced' for me. I guess > i'm a REAL baby newbie. > > Can someone please look at the following project, and > tell me why it is not writing the contents of the > readfile.txt to

Re: How to get folder name of current script running?

2002-07-18 Thread chris
Just the thing I am looking for. I will try to read the docs first. Thanks. On Thu, 18 Jul 2002 16:27:06 -0700, [EMAIL PROTECTED] (John W. Krahn) wrote: >Chris wrote: >> >> How to get folder name of current script running? >> >> This may or may not be the current active folder but the folder w

Re: quotas

2002-07-18 Thread Ramprasad A Padmanabhan
There is a perl module Quota get it from CPAN Mat Harris wrote: > hi, how can i edit a users' filesystem quota on redhat 7.3 from a perl > script. i know that you can use the edquota program on the command line > but that is an editor-style environment and thus would require an expect > script

Re: Help starting out....

2002-07-18 Thread Ramprasad A Padmanabhan
If You wont take any offence I would suggest get a copy of 'perl for dummies'. If you are already familiar with C++ I think You can start programming in Perl within a single day Best Of Luck Any way I am trying to the reverse. I have worked in perl for 2 years and now would like to start C++

RE: perl graphics editing

2002-07-18 Thread Naika - EV1
Unless you are just trying to do it in one click, you can create an action in Photoshop that you can use on each image. - Naika http://naikaonline.com -Original Message- From: David Gerler [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 18, 2002 1:35 PM To: Matt Simonsen; Beginners Sub

Chopping a string.

2002-07-18 Thread Octavian Rasnita
Hi all, I have a string $line that can be a short word or a very long line, and I want to cut it if it is longer than 20 characters, then to end it with Is there any Perl function for chopping what is over a number of characters? For example I have a string: $line = "Microsoft is a big com

RE: Chopping a string.

2002-07-18 Thread Toby Stuart
$line = substr($line,0,19,) . "..."; > -Original Message- > From: Octavian Rasnita [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 18, 2002 11:52 PM > To: [EMAIL PROTECTED] > Subject: Chopping a string. > > > Hi all, > > I have a string $line that can be a short word or a very long

FW: Chopping a string.

2002-07-18 Thread Toby Stuart
> -Original Message- > From: Toby Stuart [mailto:[EMAIL PROTECTED]] > Sent: Friday, July 19, 2002 4:46 PM > To: 'Octavian Rasnita' > Cc: '[EMAIL PROTECTED]' > Subject: RE: Chopping a string. > > > $line = substr($line,0,19,) . "..."; $line = substr($line,0,19) . "..."; # removed the u