Re: determining size of array through reference

2004-04-06 Thread Andrew Gaffney
david wrote: Andrew Gaffney wrote: I've got an array reference and I'm trying to figure out how many elements are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and probably a few others that I've forgotten. What is the correct way to do this? you can try @{EXP} or $#{E

Re: determining size of array through reference

2004-04-06 Thread david
Andrew Gaffney wrote: > I've got an array reference and I'm trying to figure out how many elements > are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and > probably a few others that I've forgotten. What is the correct way to do > this? you can try @{EXP} or $#{EXP}+1 w

determining size of array through reference

2004-04-06 Thread Andrew Gaffney
I've got an array reference and I'm trying to figure out how many elements are in it. I've tried '$#arrayref', '[EMAIL PROTECTED]', '$(@($arrayref))', and probably a few others that I've forgotten. What is the correct way to do this? -- Andrew Gaffney Network Administrator Skyline Aeronautics, L

Re: determining reference type

2004-04-06 Thread Andrew Gaffney
WC -Sx- Jones wrote: Andrew Gaffney wrote: How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do tha

Re: determining reference type

2004-04-06 Thread Wiggins d Anconia
> How do you determine what type of data a reference points to? I have a function (one in > previous post) that can take either an array of scalars or an array of hash references. I > want to execute different code based on which one it was. How can I do that? > perldoc -f ref Alternatively

Re: determining reference type

2004-04-06 Thread WC -Sx- Jones
Andrew Gaffney wrote: How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do that? use the ref() func

Re: determining reference type

2004-04-06 Thread Paul Johnson
On Tue, Apr 06, 2004 at 05:15:17PM -0500, Andrew Gaffney wrote: > How do you determine what type of data a reference points to? I have a > function (one in previous post) that can take either an array of scalars or > an array of hash references. I want to execute different code based on > which

Re: More Details --- Re: Questions about game design in perl

2004-04-06 Thread WC -Sx- Jones
Luinrandir Hernsen wrote: I went to www.MySQL.com Do I download for windows and DBI for perl do I need Contributed APIs: DBI -- for connecting to MySQL from Perl I downloaded MySQL 4.0 Your MySQL database should be installed and functioning on Unix then. I have OptiPerl, which I use top write per

determining reference type

2004-04-06 Thread Andrew Gaffney
How do you determine what type of data a reference points to? I have a function (one in previous post) that can take either an array of scalars or an array of hash references. I want to execute different code based on which one it was. How can I do that? -- Andrew Gaffney Network Administrator S

need help modifying code

2004-04-06 Thread Andrew Gaffney
I have written the following code to generate HTML reports from Perl scripts. It works pretty well. I need to modify it to accept parameters for each column (e.g. column width, whether to total that column, etc.), but I can't figure out the best way to go about it. sub generate_report_html { m

Re: More Details --- Re: Questions about game design in perl

2004-04-06 Thread Luinrandir Hernsen
I went to www.MySQL.com Do I download for windows and DBI for perl do I need Contributed APIs: DBI -- for connecting to MySQL from Perl I downloaded MySQL 4.0 I have OptiPerl, which I use top write perl I have windows 98. My Web Host has Unix. I kow how to parse a variable... but still need

Re: Questions about game design in perl

2004-04-06 Thread JupiterHost.Net
Hallo Hello I am trying to build a game in perl. I have questions. This is a story book game... here is the story, make a choice next page..here is the story, make a choice cool 1-Do I set up the login file (password name and your game details) in one big file, or in many files, one file per

Re: More Details --- Re: Questions about game design in perl

2004-04-06 Thread James Edward Gray II
Let's keep this discussion on the list so all can learn and help. On Apr 6, 2004, at 3:08 PM, Luinrandir Hernsen wrote: This will be a multi player game Interactive fiction-yes No audio files Have you ever heard of Zork Books? No, but I believe I'm getting the idea now. Basically, you get a

RE: Generating a chart/graph for comparison

2004-04-06 Thread Shah, Urmil
I have been using this graph module at : http://www.advsofteng.com/ and I love it. I find this excellent and it has all kinds of graphs and easy to code and make changes to font/color/layout/legends etc. Urmil -Original Message- From: Alok Bhatt [mailto:[EMAIL PROTECTED] Sent: Tuesday,

Re: Questions about game design in perl

2004-04-06 Thread WC -Sx- Jones
Luinrandir Hernsen wrote: 1-Do I set up the login file (password name and your game details) in one big file, or in many files, one file per player? Have you seen PostgresSQL and Bricolage? Maybe at least a good templatingsystem? I would only use one file per play for config data on each player -

Re: Questions about game design in perl

2004-04-06 Thread James Edward Gray II
On Apr 6, 2004, at 2:11 PM, Luinrandir Hernsen wrote: Hallo Howdy. I am trying to build a game in perl. I have questions. This is a story book game... here is the story, make a choice next page..here is the story, make a choice Are we talking Interactive Fiction, or where you referring to act

Re: Questions about game design in perl

2004-04-06 Thread Morbus Iff
>I am trying to build a game in perl. I have questions. >This is a story book game... here is the story, make a choice >next page..here is the story, make a choice I'd love to see what you come up with. Games and Perl is close to my heart. >1-Do I set up the login file (password name and your g

Re: New to Perl

2004-04-06 Thread WC -Sx- Jones
Jayakumar Rajagopal wrote: undef is false in perl. Jones did not mean what you pressumed. but not all false are undefs. So undef is sub set of false, that can be tested using defined( ) etc. Jones meant that, an undef would return false in a logical context.

Questions about game design in perl

2004-04-06 Thread Luinrandir Hernsen
Hallo I am trying to build a game in perl. I have questions. This is a story book game... here is the story, make a choice next page..here is the story, make a choice 1-Do I set up the login file (password name and your game details) in one big file, or in many files, one file per player? Th

RE: New to Perl

2004-04-06 Thread Jayakumar Rajagopal
-Original Message- From: david [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 06, 2004 3:55 PM To: [EMAIL PROTECTED] Subject: Re: New to Perl Wc -Sx- Jones wrote: you said: > UNDEF will be 'treated' as FALSE; Larry had to have some sanity > somewhere... clearly stating that undef is fa

Re: New to Perl

2004-04-06 Thread david
Wc -Sx- Jones wrote: you said: > UNDEF will be 'treated' as FALSE; Larry had to have some sanity > somewhere... clearly stating that undef is false but later you said: > > ( But, UNDEF is not TRUE OR FALSE - it is undefined. ) > clearly stating that undef is neither true nor false. which way

Re: New to Perl

2004-04-06 Thread WC -Sx- Jones
david wrote: your previous posts sound like: * 3 possible values (3-way logic): true or false or neither true nor false And that is why I said "you guys are good fish." (And then then the Perl police arrived ... :) Just kidding... and my very original quesiont is: show me an expression where

Re: New to Perl

2004-04-06 Thread WC -Sx- Jones
Wiggins d Anconia wrote: [ed.]-Sx- wrote: Undef is a valid condition in Perl Yes or No? No. Can undef ever be true? If not, it necessarily is false, which means it is not an independent "condition". The closest you could get would be "0 but true" but then you are still only close (and not close

Re: parsing a file

2004-04-06 Thread WC -Sx- Jones
Stephen Finley wrote: "/> it should get changed to the following? "/> You are saying this is wrong: "/> (It has And this is right? "/> This \\ escapes only the slash in \\" not the " so the result is unbalanced " " in the output -- is that what you want? I think you need to test ahead for \" a

Re: New to Perl

2004-04-06 Thread david
Wc -Sx- Jones wrote: > david wrote: > >> * You *might* be saying $i is unknown (or undef) because $ENV{something} >> can be true, or false or neither true nor false which '?:' can't handle. >> correct? > > Undef is a valid condition in Perl Yes or No? yes but is undef true or false? and when y

Re: New to Perl

2004-04-06 Thread Wiggins d Anconia
> david wrote: > > > * You *might* be saying $i is unknown (or undef) because $ENV{something} can > > be true, or false or neither true nor false which '?:' can't handle. > > correct? > > Undef is a valid condition in Perl Yes or No? > > -Sx- No. Can undef ever be true? If not, it necessari

Re: New to Perl

2004-04-06 Thread WC -Sx- Jones
david wrote: * You *might* be saying $i is unknown (or undef) because $ENV{something} can be true, or false or neither true nor false which '?:' can't handle. correct? Undef is a valid condition in Perl Yes or No? -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-ma

Re: tempfile

2004-04-06 Thread WC -Sx- Jones
Bob Showalter wrote: WC -Sx- Jones wrote: Christian Stalp wrote: Hello together, I want to create a tempfile via the function tempfile. But I want a certain path and name for the file. The option DIR and SUFFIX and s.o. is clear to me but how can I set the name of the file? For Exam: temp_file.l

Re: New to Perl

2004-04-06 Thread david
Wc -Sx- Jones wrote: > david wrote: > >> how does simply putting a piece of logic in your code and print out an >> error meesage when a variable match a certain value prove something in >> Perl is either true nor false? this is simply impossible in Perl because >> you can never code a 3-way logic

Re: use MD5

2004-04-06 Thread DBSMITH
this was done! thanks! Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams

Re: use MD5

2004-04-06 Thread Wiggins d Anconia
Please bottom post > > so does that mean a recompile of perl ? Can't I just edit that array to > include this path? > that is right @INC is not correct. What is an example of you PERL5LIB > variable? > No recompile needed. You have a number of ways to update @INC, none of which involves

Re: illegal octal digit '8'?

2004-04-06 Thread Charlotte Hee
Thank you. I will study this more perlish style and upgrade my program. Chee On Fri, 2 Apr 2004, Wiggins d'Anconia wrote: > Date: Fri, 02 Apr 2004 20:21:11 -0500 > From: Wiggins d'Anconia <[EMAIL PROTECTED]> > To: Charlotte Hee <[EMAIL PROTECTED]> > Cc: [EMAIL PROTECTED] > Subject: Re: illegal

RE: [OT] last day of a month

2004-04-06 Thread Bob Showalter
Bob Showalter wrote: > set `cal 12 2004` && eval echo \${$#} here's a simpler one that doesn't zap your parameters: : $(cal 12 2004) && echo $_ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: [OT] last day of a month

2004-04-06 Thread Bob Showalter
NYIMI Jose (BMB) wrote: > Hello, > > How to get the last day of a month using a korn shell command ? > So far I found the following : > > > echo `cal 12 2004` | awk '{print $NF}' > > Do you have alternative ? I think that one's pretty clever. How about the similar: set `cal 12 2004` && eval

RE: use MD5

2004-04-06 Thread DBSMITH
I installed it via perl Makefile.PL make make test make install. I did use Digest::MD5-2.33 ok thanks anyway! Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams Bob Showalter <[EMAIL PROTECTED]> 04/06/2004 11:49 AM To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>, [EMAIL PROTE

RE: use MD5

2004-04-06 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > All, > > can anyone advise? > I have MD5 config'ed and compiled and it is in my PATH variable. How did you install MD5? If you installed it using the standard method, it should be in the proper location. PATH is irrelevant to Perl module searches. Also, you should use

RE: [OT] last day of a month

2004-04-06 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Nyimi Jose) writes: >I know that my question is off-topic that's why my subject starts whith the > [OT] flag. >I thought that a lot of people using Perl are also familiar with unix scrip >ting and hoped >someone could help me. >Unfortunately I ca

Re: use MD5

2004-04-06 Thread DBSMITH
so does that mean a recompile of perl ? Can't I just edit that array to include this path? that is right @INC is not correct. What is an example of you PERL5LIB variable? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams "Wiggins d Anconia" <[EMAIL PROTECTED]> 04/06/2004 11:36 AM

Re: use MD5

2004-04-06 Thread Wiggins d Anconia
> > All, > > can anyone advise? > I have MD5 config'ed and compiled and it is in my PATH variable. Thank > you! > In your "PATH" variable? Should that be your "PERL5LIB" variable? By your statement I assume it is not in the default @INC compiled into your perl? http://danconia.org > #

use MD5

2004-04-06 Thread DBSMITH
All, can anyone advise? I have MD5 config'ed and compiled and it is in my PATH variable. Thank you! #> perl -de 1 Loading DB routines from perl5db.pl version 1.23 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(-e:1): 1 DB<1> use MD5; Can'

Re: Generating a chart/graph for comparison

2004-04-06 Thread Wiggins d Anconia
> Hi all, > > I need to capture data from oracle database and > present it in form of a chart/ graph. Also, we need to > compare the cureent week reports with last week, which > can be done best through chart comparison. > I checked out CPAN and found quite a few under > category graph. Can some

Re: tempfile

2004-04-06 Thread Wiggins d Anconia
> > > Did you find a way to set the filename to "temp_file.lock"? The OP has > > obviously RTFM. > > Is no problem now with: > open LOCK_FH , ">$file_name" or die "cannot create hanlde!\n"; > . > . > . > close LOCK_FH; > > unlink ( $file_name ) or warn "cannot delete !\n"; > > I can do what I

parsing a file

2004-04-06 Thread Stephen Finley
Hi all hope someone can help We have several jsp files that are not formatted correctly. I have a script that will escape a quote if it is not all ready escaped in a valid statement, but can not get it to work if the quote is already escaped inside a quoted statement. Any idea what to do with a

Re: tempfile

2004-04-06 Thread Christian Stalp
> Did you find a way to set the filename to "temp_file.lock"? The OP has > obviously RTFM. Is no problem now with: open LOCK_FH , ">$file_name" or die "cannot create hanlde!\n"; . . . close LOCK_FH; unlink ( $file_name ) or warn "cannot delete !\n"; I can do what I want to do. I just thought t

Re: Pattern Matching

2004-04-06 Thread James Edward Gray II
On Apr 6, 2004, at 7:46 AM, prabu wrote: Hi, Howdy. I want to match a pattern and replace with another string.Since the "?" is also one of the character present in the string. I am not able to do it. I bet we can fix that. Please help to how to make "?" acceptable in the string used for pa

AW: Pattern Matching

2004-04-06 Thread Schell, Holger
Use the Escape-Character "\" I think this should work... Best regards, Holger Schell SAP AG, 68789 Rot (Germany) Non-ABAP Production Services SAP Production Student Phone: +49 6227 7- 66814 Fax: +49 6227 78-38366 ROT15, CU.01 -Ursprüngliche Nachricht- Von: news [mailto:[EMA

Pattern Matching

2004-04-06 Thread prabu
Hi, I want to match a pattern and replace with another string.Since the "?" is also one of the character present in the string. I am not able to do it. Please help to how to make "?" acceptable in the string used for pattern matching. My problem is: Here in the script,how to make the Perl to a

RE: tempfile

2004-04-06 Thread Bob Showalter
WC -Sx- Jones wrote: > Christian Stalp wrote: > > Hello together, > > I want to create a tempfile via the function tempfile. > > But I want a certain path and name for the file. > > The option DIR and SUFFIX and s.o. is clear to me but how can I > > set the name of the file? For Exam: temp_file.lo

RE: tempfile

2004-04-06 Thread Bob Showalter
Christian Stalp wrote: > Hello together, > I want to create a tempfile via the function tempfile. > But I want a certain path and name for the file. > The option DIR and SUFFIX and s.o. is clear to me but how can I > set the name of the file? For Exam: temp_file.lock or somethink like > that!? T

Re: tempfile

2004-04-06 Thread WC -Sx- Jones
Christian Stalp wrote: Hello together, I want to create a tempfile via the function tempfile. But I want a certain path and name for the file. The option DIR and SUFFIX and s.o. is clear to me but how can I set the name of the file? For Exam: temp_file.lock or somethink like that!? CPAN is your f

tempfile

2004-04-06 Thread Christian Stalp
Hello together, I want to create a tempfile via the function tempfile. But I want a certain path and name for the file. The option DIR and SUFFIX and s.o. is clear to me but how can I set the name of the file? For Exam: temp_file.lock or somethink like that!? Gruss Christian -- To unsubscribe,

Re: New to Perl

2004-04-06 Thread WC -Sx- Jones
david wrote: how does simply putting a piece of logic in your code and print out an error meesage when a variable match a certain value prove something in Perl is either true nor false? this is simply impossible in Perl because you can never code a 3-way logic. use strict; use warnings; my $t

Generating a chart/graph for comparison

2004-04-06 Thread Alok Bhatt
Hi all, I need to capture data from oracle database and present it in form of a chart/ graph. Also, we need to compare the cureent week reports with last week, which can be done best through chart comparison. I checked out CPAN and found quite a few under category graph. Can someone please let m

Re: tracking mail logs

2004-04-06 Thread WC -Sx- Jones
Price, Jason (TLR Corp) wrote: Sounds like a great idea to me. I have a similar script on my to-do list, but not sure when I'll be able to get to it. Sendmail is widely enough used to warrant a module for it, I would think... Jason -Original Message- From: Traeder, Philipp [mailto:[EMAI

Cannot get Sendmail::Milter compiled on HP-UX 11i

2004-04-06 Thread Goerke, Michael
Hi, I'm trying to install Sendmail::Milter on an HP9000/B1000 box, HP-UX 11i. Perl was taken from HP (perl, v5.8.2 built for PA-RISC1.1-thread-multi, HP c-compiler used), sendmail is in its last version (8.12.11), and Sendmail:Milter is 0.18. After appending to site.config.m4: APPENDDEF(`conf_sen

Building a gui similar to linux install splash screens

2004-04-06 Thread Hamish Whittal
Hi folks, I am trying to build an interactive GUI frontend that will be similar in nature to those kiosk-style terminals giving info on all sorts of stuff. In a sense, it should have the look and feel of the install splash screens that you get while installing SuSE, RedHat and Fedora. I want to bu

RE: [OT] last day of a month

2004-04-06 Thread NYIMI Jose (BMB)
> -Original Message- > From: Randy W. Sims [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 06, 2004 10:14 AM > To: NYIMI Jose (BMB) > Cc: [EMAIL PROTECTED] > Subject: Re: [OT] last day of a month > > Your question is off-topic. If you want to know how to do it > with perl, > use the Da

Re: [OT] last day of a month

2004-04-06 Thread Randy W. Sims
NYIMI Jose (BMB) wrote: Hello, How to get the last day of a month using a korn shell command ? So far I found the following : echo `cal 12 2004` | awk '{print $NF}' Do you have alternative ? Your question is off-topic. If you want to know how to do it with perl, use the DateTime module. Otherw

[OT] last day of a month

2004-04-06 Thread NYIMI Jose (BMB)
Hello, How to get the last day of a month using a korn shell command ? So far I found the following : >echo `cal 12 2004` | awk '{print $NF}' Do you have alternative ? Thanks in advance for your input. José. DISCLAIMER "This e-mail and any attachment thereto may contain informatio