Re: Can't use global FILEHANDLEs?

2004-01-30 Thread TeamSolCO
Awesome. This tip cleared the problem right up; thanks for explaining it! - Original Message - From: "Steve Grazzini" <[EMAIL PROTECTED]> To: "TeamSolCO" <[EMAIL PROTECTED]> Cc: "Perl Beginners List" <[EMAIL PROTECTED]> Sent: Friday, January 30, 2004 3:26 PM Subject: Re: Can't use global

Re: Use and Require

2004-01-30 Thread mcdavis941
[.. old posts snipped ..] One important difference between 'use' and 'require' has to do with allowing your program to decide whether to include it or not. You CAN put 'require' inside an if statement, and it will only be executed if the if condition is true, allowing your program to decide whe

Re: New Perl User needs help with POST in perl

2004-01-30 Thread R. Joseph Newton
Chris Reddekopp wrote: > My apologies. Let me explain better... > > In the dbm file will be the array with the customer's email address with a > value of 1 or 0 next to it. It is not always a good idea to decide in advance what tools you need for the job. It sounds like this one is a good candid

[no subject]

2004-01-30 Thread beginners
The message contains Unicode characters and has been sent as a binary attachment. <>

Re: Regarding Text Widget in Perl/Tk

2004-01-30 Thread wolf blaum
For Quality purpouses, zentara 's mail on Friday 30 January 2004 16:22 may have been monitored or recorded as: Hi, neat trick! Great. However, I have a, well, couriosity? My script looks pretty much the same, except the print in &dosomething (since it is acctually your script:-)) > Here is a

Re: Array subtraction, like sets

2004-01-30 Thread Robin Sheat
On Fri, Jan 30, 2004 at 10:33:27AM -0500, Jeff 'japhy' Pinyan wrote: > Well, that only works if $a[0] is [1,2,3] and $b[1] is $a[0] -- that is, > the EXACT SAME reference. It won't work if $b[1] is its own [1,2,3]. Hmm, right. Not so good. I had thought of that, and thought I tested it in that si

Re: Use and Require

2004-01-30 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mallik) writes: >Dear Perl Gurus, > >What is the difference between Use and Require. use Foo; is equivalent to: BEGIN { require Foo; Foo->import; } -- Peter Scott http://www.perldebugged

Re: How to put a variable value into a text file

2004-01-30 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > > Hi Joseph: > > Thanks very much for the feedback. Unfortunately for me, > I've been totally swamped with tasks totally unrelated to > Perl. I've had virtually no time to spend on this. I > hope to have time this weekend to look at Perl related > activities (my wife

Re: A little help please?

2004-01-30 Thread wolf blaum
For Quality purpouses, Joel 's mail on Saturday 31 January 2004 00:26 may have been monitored or recorded as: Hi, > I'm interested in learning to program perl, and I just got ActivePerl for > Windows. I am running XP and have a few questions. First off, how do I run > the interpreter under Wind

A little help please?

2004-01-30 Thread Joel
I'm interested in learning to program perl, and I just got ActivePerl for Windows. I am running XP and have a few questions. First off, how do I run the interpreter under Windows, preferably without the XP command prompt? Also, when I opened perl, it looked like the command prompt. Is the comma

RE: binary perl

2004-01-30 Thread Tim Johnson
perldoc perlcc -Original Message- From: Dan Brow [mailto:[EMAIL PROTECTED] Sent: Friday, January 30, 2004 11:03 AM To: Perl Beginners Subject: Re: binary perl What's the perl compiler called? On Sat, 2004-01-24 at 18:13, Dan Anderson wrote: > On Fri, 2004-01-23 at 20:44, Dan Brow wrot

Re: Can't use global FILEHANDLEs?

2004-01-30 Thread Rob Dixon
Sorry - bad click. /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: binary perl

2004-01-30 Thread Dan Brow
What's the perl compiler called? On Sat, 2004-01-24 at 18:13, Dan Anderson wrote: > On Fri, 2004-01-23 at 20:44, Dan Brow wrote: > > Is it possible to make a perl script/program a binary file? > > There is an experimental perl compiler. It's not recommended for > production use but is a cool to

Re: Can't use global FILEHANDLEs?

2004-01-30 Thread Rob Dixon
"Teamsolco" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > To start, let me say this: > 1) I have both "Learning Perl 3rd Ed" and "Programming Perl 3rd Ed" > 2) I have read "Learning Perl 3rd Ed", and I use "Programming Perl 3rd Ed" as > reference. > 3) I have searched with Google

Re: Can't use global FILEHANDLEs?

2004-01-30 Thread John W. Krahn
Teamsolco wrote: > > To start, let me say this: > 1) I have both "Learning Perl 3rd Ed" and "Programming Perl 3rd Ed" > 2) I have read "Learning Perl 3rd Ed", and I use "Programming Perl 3rd Ed" > as reference. > 3) I have searched with Google for several key words related to my problem, > but the

Re: Can't use global FILEHANDLEs?

2004-01-30 Thread Steve Grazzini
TeamSolCO wrote: Now then, I've opened a can of worms by adding "use strict" and > "use warnings" to the source. Keep in mind that this application was running JUST FINE before doing this. I'm only trying to 'modernize' this old code. Having started with a couple screen-fulls of resulting > erro

Can't use global FILEHANDLEs?

2004-01-30 Thread TeamSolCO
To start, let me say this: 1) I have both "Learning Perl 3rd Ed" and "Programming Perl 3rd Ed" 2) I have read "Learning Perl 3rd Ed", and I use "Programming Perl 3rd Ed" as reference. 3) I have searched with Google for several key words related to my problem, but the mass of junk I get back is no

Re: Use and Require

2004-01-30 Thread drieux
On Jan 29, 2004, at 9:57 AM, Mallik wrote: [..] What is the difference between Use and Require. [..] The easiest way to think about it was that once upon a time we wanted to have 'functions' that would be in 'perl libraries' - so there needed to be a directive that indicated that the code 'require

Re: Running Perl CGI from Windows

2004-01-30 Thread wolf blaum
For Quality purpouses, Jan Eden 's mail on Friday 30 January 2004 20:17 may have been monitored or recorded as: Hi Jan > Like this: > > accept-charset="iso-8859-1"> ... Try enctype="application/x-www-form-urlencoded" instead. I had the very same problem using the xitami webserver on WinOs. D

RE: sort from the smallest number to the highest number

2004-01-30 Thread EUROSPACE SZARINDAR
Hi, Here is an old answer to your problem from Randy W. Sims. Hope it will helps. Perhaps you would have to modify the sort to have an numerical. Michel S -Message d'origine- De: Randy W. Sims [mailto:[EMAIL PROTECTED] Date: vendredi 23 janvier 2004 10:53 À: Bjorn Van Blanckenberg Cc:

Re: Running Perl CGI from Windows

2004-01-30 Thread wolf blaum
For Quality purpouses, Jan Eden 's mail on Friday 30 January 2004 20:01 may have been monitored or recorded as: > Hi all, Hi .. > But accessing the script from a Windows machine gives me the prepared error > message. From the log I can see that all parameter values end up in the > $name variable,

Re: Running Perl CGI from Windows

2004-01-30 Thread Jan Eden
Hi Wolf, wolf blaum wrote: >For Quality purpouses, Jan Eden 's mail on Friday 30 January 2004 >20:01 may have been monitored or recorded as: >>Hi all, >Hi ... >>But accessing the script from a Windows machine gives me the >>prepared error message. From the log I can see that all parameter >>value

Re: perl editors

2004-01-30 Thread Ricardo SIGNES
* [EMAIL PROTECTED] [2004-01-30T12:55:38] > Thank you, but I was hoping to have a editor compatible with Redhat and or > HP and or AIX that gives you a color coded interface, such when there is a > syntax error it color codes it in red. If you have ever seen or used a VB > editor you know what

Running Perl CGI from Windows

2004-01-30 Thread Jan Eden
Hi all, I hope this is not too off-topic, since I hesitate to subscribe to yet another list... I wrote a very simple CGI script to read data from an HTML form like this: my $q = new CGI; my $name = $q->param('name'); my $message = $q->param('message'); my $email = $q->param('email'); Later, th

Re: Re: perl editors

2004-01-30 Thread LoneWolf
Nedit http://nedit.org/ Macros can be found here if they are not already there (nedit comes with a LOT of them already) http://www.google.com/search?sourceid=navclient&ie=UTF-8&oe=UTF-8&q=nedit HTH Robert >On Fri, 30 Jan 2004 08:32:02 -0700 Wiggins d Anconia <[EMAIL PROTECTED]> wrote. >> >> Is

Re: perl editors

2004-01-30 Thread Wiggins d Anconia
Please bottom post... > This is a multipart message in MIME format. > > Thank you, but I was hoping to have a editor compatible with Redhat and or > HP and or AIX that gives you a color coded interface, such when there is a > syntax error it color codes it in red. If you have ever seen or used

RESOLUTION: Using CPAN.PM on Win32: How Direct to Proper Perl Location

2004-01-30 Thread mcdavis941
Hi, this message is to let you know the resolution of an issue I posted on 25 Jan 2004.  I post this for the benefit of anyone Googling on the relevent keywords. My original post listed an error message for a condition in which neither CPAN.pm, CPANPLUS.pm nor Makefile.PL (for multiple packages)

Re: style of functions with complex arguments

2004-01-30 Thread Robin Sheat
On Fri, Jan 30, 2004 at 07:40:06AM -0700, Wiggins d Anconia wrote: > immediately if all of the needed options have been passed in. Second, > for your triples I would use array references, and for the set of 3 > triples I would use an array reference as well. So my call looks like, I looked at thi

Re: using Perl to auto-login to capitalone.com

2004-01-30 Thread Andrew Gaffney
Wiggins d Anconia wrote: I am attempting to write a Perl script that can login to my account at capitalone.com, grab my balance and available credit and email them to me. I did this successfully with my online banking, but Capitalone's login is a pain in the ass to wrap my head around. It redire

Re: perl editors

2004-01-30 Thread DBSMITH
Thank you, but I was hoping to have a editor compatible with Redhat and or HP and or AIX that gives you a color coded interface, such when there is a syntax error it color codes it in red. If you have ever seen or used a VB editor you know what I mean. Currently I use vi all the time, does vim

Re: How to put a variable value into a text file

2004-01-30 Thread Daniel Staal
--As off Friday, January 30, 2004 7:57 AM -0500, [EMAIL PROTECTED] is alleged to have said: Basically, I wanted to know how to put a receipient's name into a canned letter. Like this. $name = "Joe Blow" The canned letter template: --As for the rest, it is mine. Has anyone pointed out Text::Te

RE: Shell script build Config.pm file

2004-01-30 Thread Griffin, Michael (PEC)
> I have found that there is documentation indicating the automation of > modules: > perl -MCPAN -e 'install Bundle::myBundle' > where myBundle is basically a pod file with =head1 CONTENTS and then a > list of the modules to install. > > I have seen some documentation using the interactive

Re: Perl/Tk and portability

2004-01-30 Thread wolf blaum
For Quality purpouses, Gary Stainburn 's mail on Friday 30 January 2004 16:26 may have been monitored or recorded as: > Hi folks, > Hi Gary, > As I've never looked at Tk before I would appreciate people's opinions on > it. Specifically, how easy is it to develop, and how portable is it between >

RE: Array subtraction, like sets

2004-01-30 Thread Bob Showalter
Robin Sheat wrote: > Hey there, what is a nice way of doing what this looks like it should > do: > > @a=([1,2,3],[5,5,5],[9,8,7]); > @b=([5,5,5],[1,2,3]); > @[EMAIL PROTECTED]@b; > > and have @c == ([1,2,3]); > > Is there a good way of doing this? (I've tried the obvious things on > the command

RE: Shell script build Config.pm file

2004-01-30 Thread Griffin, Michael (PEC)
I have found that there is documentation indicating the automation of modules: perl -MCPAN -e 'install Bundle::myBundle' where myBundle is basically a pod file with =head1 CONTENTS and then a list of the modules to install. I have seen some documentation using the interactive CPAN shell th

Re: Array subtraction, like sets

2004-01-30 Thread Jeff 'japhy' Pinyan
On Jan 31, Robin Sheat said: >> > @a=([1,2,3],[5,5,5],[9,8,7]); >> > @b=([5,5,5],[1,2,3]); >> > @[EMAIL PROTECTED]@b; ># ># subArray - takes two array references, and subtracts any instances ># of the arrays in the second one from the first one. Returns the new list. >sub subArray { >my @

RE: Shell script build Config.pm file

2004-01-30 Thread Wiggins d Anconia
Please bottom post... > I have found that there is documentation indicating the automation of > modules: > perl -MCPAN -e 'install Bundle::myBundle' > where myBundle is basically a pod file with =head1 CONTENTS and then a > list of the modules to install. > > I have seen some documentation

Re: perl editors

2004-01-30 Thread Wiggins d Anconia
> > Is there a visual perl editor out there, freeware or shareware for any > Linux flavor? > perldoc -q 'IDE or Windows Perl Editor' Since I use Vim the closest for me would be gvim. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Perl/Tk and portability

2004-01-30 Thread Gary Stainburn
Hi folks, I'm looking to write an app that I want both Linux and Windows users to be able to use. This app will be interactive (my train simulator/controller app for those who followed my previous threads) so I will need some form of user interface. As I've never looked at Tk before I would a

perl editors

2004-01-30 Thread DBSMITH
Is there a visual perl editor out there, freeware or shareware for any Linux flavor? Derek B. Smith OhioHealth IT UNIX / TSM / EDM Teams

Re: Array subtraction, like sets

2004-01-30 Thread Robin Sheat
On Fri, Jan 30, 2004 at 07:48:35AM -0700, Wiggins d Anconia wrote: > Going to need more info about what you think this looks like it should > do, because I (and maybe others here) lack the math skills to get your > answer, funny, I got [9,8,7]. Thats what I get for not profraedinng, the result shou

Re: sort from the smallest number to the highest number

2004-01-30 Thread Jeff 'japhy' Pinyan
On Jan 30, Boon Chong Ang said: >Just say I want to sort the row by using the fifth column data as >reference from the smallest the largest number >Abc 12.8 8 "left" 1 1.7 >Dgf 12.3 9 "right" 4 2.6 >bac 12.8 8 "left" 1 3.7 >Def 13.8 9 "top" 0 19.7 >gef 14.8 9 "left" 0 19.7 >etg 12.8 2 "left"

Re: SNMP.pm

2004-01-30 Thread Wiggins d Anconia
> Hi all, > > I' trying to get the IfType from my router with a script that uses the > SNMP.pm module. > It works fine, but he refuse to translate the ATM and POS interfaces. > How can I see what MIB SNMP.pm uses. > MIB == Men In Black to me, but have you looked at: http://search.cpan.org/~gsm/

Re: style of functions with complex arguments

2004-01-30 Thread Jeff 'japhy' Pinyan
On Jan 30, Robin Sheat said: >I have a function that takes a fairly complex set of arguments, and am >wondering if there is a better way of doing this than the way I have >done. A call to the function, as I have it, looks like: > >$network->potentiateWeights('network',1,(0,0,0, >

Re: Array subtraction, like sets

2004-01-30 Thread Wiggins d Anconia
> > Hey there, what is a nice way of doing what this looks like it should > do: > Going to need more info about what you think this looks like it should do, because I (and maybe others here) lack the math skills to get your answer, funny, I got [9,8,7]. > @a=([1,2,3],[5,5,5],[9,8,7]); > @b=([5

Re: Shell script build Config.pm file

2004-01-30 Thread Wiggins d Anconia
> >From a bash shell on Red Hat AS 3, can I automatically create the > /usr/lib/perl5/5.8.0/CPAN/Config.pm file? > > I am trying to automate the installation of some PERL modules but I > would like to automate the initial configuration step as well. > Does it work? Have you tried? What was the r

Re: function that reads line numbers?

2004-01-30 Thread Jeff 'japhy' Pinyan
On Jan 30, Randy W. Sims said: >On 01/30/04 03:59, John W. Krahn wrote: >> "Randy W. Sims" wrote: >> >>>while (<>) { >>> if ( $start_line .. $end_line ) { >> >> That will be true if $start_line is true and false if $start_line is >> false. The value in $end_line is irrelevant. > >perl -lne 'pri

Re: style of functions with complex arguments

2004-01-30 Thread Wiggins d Anconia
> > I have a function that takes a fairly complex set of arguments, and am > wondering if there is a better way of doing this than the way I have > done. A call to the function, as I have it, looks like: > > $network->potentiateWeights('network',1,(0,0,0, >

Re: porting to windows NT

2004-01-30 Thread R. Joseph Newton
"Johnson, Shaunn" wrote: > Howdy: > > I want to move my perl script from Linux to Windows NT. > The Linux script connects to Oracle via the DBI modules I > have installed. I want to do the same on NT, but I'm not > sure if the connection strings / values are the same. > > In the linux script: > >

Shell script build Config.pm file

2004-01-30 Thread Griffin, Michael (PEC)
>From a bash shell on Red Hat AS 3, can I automatically create the /usr/lib/perl5/5.8.0/CPAN/Config.pm file? I am trying to automate the installation of some PERL modules but I would like to automate the initial configuration step as well. Michael E. Griffin Red Hat Linux Systems Administrator PE

Re: goto command

2004-01-30 Thread Noah Ganter
The reason why the goto command is not generally used in perl (and other languages) is that it does not force the developer to have a theoretical framework for the program. It creates 'spagetti code' where a person working on the code or trying to understand what the developer has done has to follo

Re: logrotate and perl file handles. How do I know when to reopen my log file? (fwd)

2004-01-30 Thread John McKown
Sorry if this is a repost, but I haven't seen it come across the list and I did have some problems with my mail server when I originally tried to post it. What is happening is that once a file has been opened, the handle points to the "inode" which is an internal "number". This "number" is uni

Re: How to put a variable value into a text file

2004-01-30 Thread stuart_clemons
Hi Joseph: Thanks very much for the feedback. Unfortunately for me, I've been totally swamped with tasks totally unrelated to Perl. I've had virtually no time to spend on this. I hope to have time this weekend to look at Perl related activities (my wife may have other thoughts about that ho

Re: print outbut being buffered...

2004-01-30 Thread Michael W . Cocke
On Thu, 29 Jan 2004 03:12:21 -0800, [EMAIL PROTECTED] (John W. Krahn) wrote: >"Michael W . Cocke" wrote: >> >> This is probably a stupid question, but does anyone know how to force >> the output of print to actually PRINT, without forcing me to use a \n? >> >> It's sort of futile to print a '.'

SNMP.pm

2004-01-30 Thread Wim
Hi all, I' trying to get the IfType from my router with a script that uses the SNMP.pm module. It works fine, but he refuse to translate the ATM and POS interfaces. How can I see what MIB SNMP.pm uses. Thanx, Wim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: multidimentional hash that has both two and three keys

2004-01-30 Thread Rob Dixon
Trina Espinoza wrote: > > Can you have a multidimentional hash that has both two and three keys? > > For example: > > Array with two keys and a value: > $HASH-> {$VAR}{letter} ="a"; > > Same Array with three keys and a value: > $HASH->{$VAR}{$number){float} = "1.1"; That closing ')' should be a '

Re: function that reads line numbers?

2004-01-30 Thread Randy W. Sims
On 01/30/04 03:59, John W. Krahn wrote: "Randy W. Sims" wrote: On 1/27/2004 9:55 PM, Trina Espinoza wrote: So this may be wishful thinking, but I would be kicking myself later if I didn't ask. Is there a function in perl where you give the function exact line numbers and it would only read the d

Re: Program to write code

2004-01-30 Thread Terry Ashley
Marcelo wrote: Hi, could anyone recommend a good program to write code, currently using notepad. Thanks a lot in advance. Marcelo I use Textpad, which is a really great editor, that has allot of the functionality that other commercial apps like CodeWarrior and Visual SlickEdit have. -- To uns

Re: New Perl User needs help with POST in perl

2004-01-30 Thread Chris Reddekopp
My apologies. Let me explain better... In the dbm file will be the array with the customer's email address with a value of 1 or 0 next to it. This way we have a list of who visited the page and downloaded the file. When I run the script again to send out the mass emails pulled from the dbm file, a

Re: function that reads line numbers?

2004-01-30 Thread John W. Krahn
"Randy W. Sims" wrote: > > On 1/27/2004 9:55 PM, Trina Espinoza wrote: > > > So this may be wishful thinking, but I would be kicking myself later > > if I didn't ask. Is there a function in perl where you give the function > > exact line numbers and it would only read the data in the range of lin

Re: Two-liner to one-liner

2004-01-30 Thread John W. Krahn
Jan Eden wrote: > > R. Joseph Newton wrote: > > >"R. Joseph Newton" wrote: Oooops, sorry, needs a small adjustment, I > >think: > > > >>Jan Eden wrote: > >> > >>> > >>>BTW, accessing $1 like this implies that $1, $2 ... form an array. > >>>How can it be accessed as a whole? > >> > >>my @matches =

Re: Two-liner to one-liner

2004-01-30 Thread Jan Eden
R. Joseph Newton wrote: >"R. Joseph Newton" wrote: Oooops, sorry, needs a small adjustment, I >think: > >>Jan Eden wrote: >> >>> >>>BTW, accessing $1 like this implies that $1, $2 ... form an array. >>>How can it be accessed as a whole? >> >>my @matches =( /($regex)/g); Ok, that should have been