RE: [RFC] Gauntlet for teachers

2001-04-23 Thread John Preece
Could we also agree a suitable acronym for all Perl Questions and replies. I suggest [BPQ] for Beginners Perl Question. That way people can set-up an email folder and move them using a rule. This would go at the start of the subject line. John Preece Technical Consultant Tel : 0121 585 255

RE: Header files dilemma!

2001-04-23 Thread Nutter, Mark
> I hope this helps, and don't forget to read: > > perldoc perlmod > perldoc perlmodlib > perldoc constant > perldoc Exporter Ooo, a bibliography at the end of the specific advice -- that's a *great* idea for a beginners list. We should make that a convention :)

Looking for perl specifications on the net

2001-04-23 Thread Zysman, Roiy
> Hi guys and girls , does any one have a web link to perl specifications, > (For example, are the specifications for a variable name) ?? > Thx

Re: Looking for perl specifications on the net

2001-04-23 Thread Paul Johnson
On Mon, Apr 23, 2001 at 06:20:16AM -0700, Zysman, Roiy wrote: > > > Hi guys and girls , does any one have a web link to perl specifications, > > (For example, are the specifications for a variable name) ?? > > Thx If you're talking about style, try perldoc perlstyle -- Paul Johnson - [EMA

Re: Looking for perl specifications on the net

2001-04-23 Thread Brent Michalski
Take a look at the Perl Style Guide... http://www.perl.com/CPAN-local/doc/manual/html/pod/perlstyle.html Brent "Zysman, Roiy" <[EMAIL PROTECTE

RE: DBI and ORACLE

2001-04-23 Thread Nutter, Mark
[Copying the list on a reply to a private email, with permission] A placeholder consists of a single question mark ("?") in your query statement. It replaces a single value in your SQL statement. For example: Without placeholders: INSERT INTO MYTABLE VALUES ('Mark', 'Nutter', 'foo', 'bar', '

Validating price (US Currency)

2001-04-23 Thread David Gilden
Is there a better way of doing this? Thanks! Dave if ($in{'price'} eq "") {print '• Missing '; } elsif (&checkPrice($in{'price'})) { print '• Wrong Format'; } sub checkPrice{ if ($_[0] =~ /\$?(\d*)(\.\d{0,2})?/) { return 1; } else { return 0; } } Allowable input:

Re: Palm OS

2001-04-23 Thread Casey West
On Sun, Apr 22, 2001 at 11:28:08PM -0700, Helio S. Junior wrote: : : I would like to know if i could develop Palm OS : applications using Perl. : Is there any package out there to do that? : Thanks for your attention. Perl has not been ported to the Palm OS yet, unfortunatley. -- Casey West

Re: Validating price (US Currency)

2001-04-23 Thread Paul Johnson
On Mon, Apr 23, 2001 at 11:38:42AM -0400, David Gilden wrote: > Is there a better way of doing this? Hmmm. Where to start? :-) > Thanks! > Dave > > > > if ($in{'price'} eq "") {print '• Missing '; } > elsif (&checkPrice($in{'price'})) { > print '• Wrong Format'; > } > > > >

print with => ??

2001-04-23 Thread David Gilden
Hello, Sorry to ask this, as I am quite new at this. And the online class that I am just now finishing has lots of bad code for examples! >From this list: print "'$file' => '$newfile'\n"; ^ What does this line mean, this a renaming convention? Thanks Dave -

Re: Palm OS

2001-04-23 Thread Sean O'Leary
At 02:28 AM 4/23/2001, you wrote: >Hello ! > > >I would like to know if i could develop Palm OS >applications using Perl. >Is there any package out there to do that? >Thanks for your attention. > > >H3li0 The short answer is no. The slightly longer answer is that so far no one has made perl run

Re: print with => ??

2001-04-23 Thread John Joseph Trammell
On Mon, Apr 23, 2001 at 12:33:00PM -0400, David Gilden wrote: > Hello, > Sorry to ask this, as I am quite new at this. > And the online class that I am just now finishing has > lots of bad code for examples! > > >From this list: > > print "'$file' => '$newfile'\n"; > ^ >

Re: Validating price (US Currency)

2001-04-23 Thread Casey West
On Mon, Apr 23, 2001 at 11:38:42AM -0400, David Gilden wrote: : Is there a better way of doing this? Dave, here is my take on it, hopefully commented well: #!/usr/local/bin/perl -w use strict; $|++; while ( ) { chomp; print( &validate( $_ ) ? 'valid entry' : 'try again punk' ); print "\

Re: Perl documentation (Net::DNS::RR::MX)

2001-04-23 Thread Sean O'Leary
At 06:23 PM 4/19/2001, you wrote: >I have a question about the Perl documentation I find on the web that >explains the usage of Perl modules. I come across this situation somewhat >frequently where I need to do something, find a module that can do it, but >just can't figure out from the basic info

Re: help me understand $_

2001-04-23 Thread Sean O'Leary
At 07:33 PM 4/22/2001, you wrote: >Sean O'Leary -- Damn that was a good explaination! I >felt like I understood $_ very well before, but I >understand it even better now. A very perlish post >indeed. Larry the linguist would be proud! > >Matt Thanks. : ) I'm glad I could help out. There are lo

Re: print with => ??

2001-04-23 Thread M.W. Koskamp
- Original Message - From: David Gilden <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 6:33 PM Subject: print with => ?? > Hello, > Sorry to ask this, as I am quite new at this. > And the online class that I am just now finishing has > lots of bad code for exam

perldoc error

2001-04-23 Thread Boex,Matthew W.
when i try to run perldoc, i get the following error. do i need to alter perldoc itself? i can run all sorts of other perl programs with modules just fine. > [boex@rootabega boex]$ perldoc > Can't locate warnings.pm in @INC (@INC contains: > /usr/lib/perl5/5.00503/i386-linux /u

RE: help me understand $_

2001-04-23 Thread Hanby, Mike
Could you repost the answer? I just joined this group and would love to read the great answer referenced in the post. Thanks, Mike -Original Message- From: Sean O'Leary [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 12:30 To: [EMAIL PROTECTED] Subject: Re: help me understand $

Re: help me understand $_

2001-04-23 Thread Casey West
On Mon, Apr 23, 2001 at 01:08:36PM -0500, Hanby, Mike wrote: : Could you repost the answer? I just joined this group and would love to : read the great answer referenced in the post. Don't forget about the archives at: http://archive.develooper.com/beginners%40perl.org/ -- Casey West

Re: help me understand $_

2001-04-23 Thread Dan Brown
Please, do not repost. Mike, please check the archive at http://archive.develooper.com/beginners%40perl.org/ If we have people reposting (and reposting and reposting) this list will become quite cluttered. Thanks, Dan "Hanby, Mike" wrote: > > Could you repost the answer? I just join

Re: perldoc error

2001-04-23 Thread Casey West
On Mon, Apr 23, 2001 at 01:06:06PM -0500, Boex,Matthew W. wrote: : : when i try to run perldoc, i get the following error. do i need to : alter perldoc itself? i can run all sorts of other perl programs : with modules just fine. >From below, it seems that you have a perldoc built f

Expect.pm

2001-04-23 Thread Matt Blatchley
Perl guru's, Looking for any examples of using the "stty -echo" command with the the expect perl module. I'm trying to spawn an ssh session and use an encrypted password from a flat file. The only problem is hiding the output from the expect session. Is it possible to make the password hidden

Admin idea

2001-04-23 Thread Sean O'Leary
Would it be possible to add a Reply-To header to all the messages originating from this list. That way we would point back to the list for regular replies, and we could still get the original poster's info from the From header. I think this would be a good idea, and pretty convenient. It s

Re: Validating price (US Currency)

2001-04-23 Thread Paul Johnson
On Mon, Apr 23, 2001 at 01:15:13PM -0400, David Gilden wrote: [ brought back to the list with permission ] > my camel learning perl book has hashs with the key in quotes, > whats going on with this? In the early days this was necessary, otherwise the key would be interpreted as a function and i

RE: Rookie Question

2001-04-23 Thread blowther
The Term::ReadLine package is one option.. You might also try the native perl function getc. Bruce W. Lowther [EMAIL PROTECTED] Micron Technology, Inc. Boise, Idaho -Original Message- From: Goodman Kristi - kgoodm [mailto:[EMAIL PROTECTED]] Sent: Monday, April 23, 2001 1:05 PM To: '[EMAI

Reference question

2001-04-23 Thread Stout, Joel R
Speaking of aging camels, is the Camel book still the best reference to have? I am new to Perl and have the Llama book. It's been a good starting place but one day I see myself moving past it. I would like something that covers the language in more detail and deals with Data Munging, XML, CGI,

quick PERL question

2001-04-23 Thread David Gilden
Dear Casey and the list, Thanks for your all of your valuable help, What is $|++ for? #!/usr/local/bin/perl -w use strict; $|++; while ( ) { chomp; print( &validate( $_ ) ? 'valid entry' : 'try again punk' ); print "\n"; } sub validate { my $currency = shift; # return false if we

Re: Reference question

2001-04-23 Thread Paul Johnson
On Mon, Apr 23, 2001 at 07:32:32PM -, Stout, Joel R wrote: > Speaking of aging camels, is the Camel book still the best reference to > have? I am new to Perl and have the Llama book. It's been a good starting > place but one day I see myself moving past it. I would like something that > co

Re: quick PERL question

2001-04-23 Thread M.W. Koskamp
- Original Message - From: David Gilden <[EMAIL PROTECTED]> To: Casey West <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 9:23 PM Subject: quick PERL question > Dear Casey and the list, > Thanks for your all of your valuable help, > > What is $|++ for? > > #!/u

Re: quick PERL question

2001-04-23 Thread Paul Johnson
On Mon, Apr 23, 2001 at 03:23:06PM -0400, David Gilden wrote: > What is $|++ for? perldoc perlvar It sets the output to be unbuffered. Personally I'd use $| = 1 just to be explicit, and in case some joker had previously set it to -1 :-) > I could not seem to include the sub chekPrice in my if

Re: quick PERL question

2001-04-23 Thread M.W. Koskamp
- Original Message - From: Paul Johnson <[EMAIL PROTECTED]> To: David Gilden <[EMAIL PROTECTED]> Cc: Casey West <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 10:30 PM Subject: Re: quick PERL question > > > > $x = &checkPrice($in{'price'}); > > if ( ($in{'name'} e

sysread and buffering

2001-04-23 Thread Lee, Janet
Hi all. I'm trying to do what I think is a very simple thing. I want to read keyboard input char by char and time the difference between each keystroke. I've tried using while (sysread STDIN, $key, 1) { dostuff }; but that seems to be doing some kind of buffering so that the body of th

Re: sysread and buffering

2001-04-23 Thread Sean O'Leary
At 05:25 PM 4/23/2001, Janet Lee wrote: >Hi all. > >I'm trying to do what I think is a very simple thing. I want to read >keyboard input char by char and time the difference between each keystroke. >I've tried using > >while (sysread STDIN, $key, 1) { > dostuff >}; > >but that seems to be

My My

2001-04-23 Thread SunDog
Hello everyone, I'm new to PERL ... and have a question about a style/format I've observed where 'my' is placed in front of arrays, hashes - you name it ... At first I interpreted this as a Nemonic name but several functions might have this in the same code .. what g

RE: [RFC] Gauntlet for teachers

2001-04-23 Thread King, Jason
I can't see those acronyms working because a beginner is just going to ask the question - and at best they're going to try and guess what acronym to use with their limited knowledge of Perl and limited perspective with which to make a worthwhile guess and if you continue to do what you're doing -

RE: Header files dilemma!

2001-04-23 Thread King, Jason
from my experience in c.l.p.misc some people take those bibliographies as a disguised RTFMs .. I'd love to see it for all posts - but am afraid at how some beginners might interpret it -- jason king No children may attend school with their breath smelling of "wild onions" in West Virginia

RE: Looking for perl specifications on the net

2001-04-23 Thread King, Jason
Roiy Zysman writes .. > Hi guys and girls , does any one have a web link to perl specifications, > (For example, are the specifications for a variable name) ?? while others have pointed you to perlstyle - to me your question reads more that you're after the technical specifications of what can a

RE: Admin idea

2001-04-23 Thread King, Jason
Sean O'Leary writes .. >Would it be possible to add a Reply-To header to all the messages >originating from this list. That way we would point back to the list >for regular replies, and we could still get the original poster's info >from the From header. excellent idea >I would also like to sec

Re: My My

2001-04-23 Thread Todd A. Jacobs
On Mon, 23 Apr 2001, SunDog wrote: > where 'my' is placed in front of arrays, hashes - you name it ... The "my" keyword makes a variable local. It's a scoping mechanism, and is primarily used inside function definitions to keep the namespace uncluttered. -- Todd A. Jacobs CodeGnome Consult

Re: My My

2001-04-23 Thread Andy Sharp
The perl documentation (perldoc -f my) has this to say about the perl builtin "my": A my declares the listed variables to be local (lexically) to the enclosing block, file, or eval. If more than one value is listed, the list must be placed in parentheses. See Private Variables via my()

RE: Expect.pm

2001-04-23 Thread King, Jason
Matt Blatchley writes .. >Looking for any examples of using the "stty -echo" command with the >the expect perl module. I'm trying to spawn an ssh session and use an >encrypted password from a flat file. The only problem is hiding the >output from the expect session. Is it possible to make the pas

Re: Header files dilemma!

2001-04-23 Thread Casey West
On Tue, Apr 24, 2001 at 09:59:46AM +1000, King, Jason wrote: : from my experience in c.l.p.misc some people take those bibliographies as a : disguised RTFMs .. I'd love to see it for all posts - but am afraid at how : some beginners might interpret it It is extremely welcome provided there is a n

RE: print with => ??

2001-04-23 Thread King, Jason
David Gilden writes .. >Sorry to ask this, as I am quite new at this. >And the online class that I am just now finishing has >lots of bad code for examples! > >>From this list: > > print "'$file' => '$newfile'\n"; > ^ > >What does this line mean, this a renaming convention?

RE: quick PERL question

2001-04-23 Thread King, Jason
M.W. Koskamp writes .. >The special variable $| sets the autoflush. See PERLVAR documentation. >Whats this person does is a dirty way of setting $| to a true >value (not 0 or undef). >Default = 0. why do you say 'dirty' ? .. do you just mean 'less readable' ? .. or are you implying some other

RE: Re: [RFC] Gauntlet for teachers

2001-04-23 Thread Dennis Fox
Why bother with acronyms that many won't use when in most email programs it is trivial to write an email filter that examines whether "To: or CC:" contains "[EMAIL PROTECTED]" and send it to a particular folder? (or write two filters, one for "To:" and one for "CC:", both sending to the same folde

print statment

2001-04-23 Thread David Gilden
Original from the class: print "\n"; Is this bad style? print '',"\n"; better? print ''. "\n"; I do believe that these 3 statements are all equivalent. Thanks Dave

RE: print statment

2001-04-23 Thread King, Jason
David Gilden writes .. >Original from the class: > >print "\n"; > > >Is this bad style? yep .. avoid backwhacks at all costs - that's my opinion >print '',"\n"; > >better? yep .. much better >print ''. "\n"; also good - but generally accepted as inferior to the second snippet >I do believe

PERL Software Installation

2001-04-23 Thread Saritha_Vinod
Hi Kindly advice me how to install Perl Software in the below Operating Systems: 1. Linux 2. Windows 98 Thanks, SV

Re: Palm OS

2001-04-23 Thread Helio S. Junior
Thank you for the information. ;-) H3li0 --- Sean O'Leary <[EMAIL PROTECTED]> wrote: > At 02:28 AM 4/23/2001, you wrote: > >Hello ! > > > > > >I would like to know if i could develop Palm OS > >applications using Perl. > >Is there any package out there to do that? > >Thanks for your attention.

Perl documentation

2001-04-23 Thread Amarnath Honnavalli Anantharamaiah
How do I get help on some modules like what are services available in particular module say NET::FTP etc etc Thanks Amar

RE: Perl documentation

2001-04-23 Thread King, Jason
Amarnath Honnavalli Anantharamaiah asks .. >How do I get help on some modules like what are services available in >particular module say NET::FTP etc etc all command-line distributions of Perl ship with a utility called perldoc .. for modules like Net::FTP you should be able to type the foll

RE: Perl documentation

2001-04-23 Thread King, Jason
Amarnath Honnavalli Anantharamaiah asks .. >How do I get help on some modules like what are services available in >particular module say NET::FTP etc etc all command-line distributions of Perl ship with a utility called perldoc .. for modules like Net::FTP you should be able to type the foll

RE: Perl documentation

2001-04-23 Thread Amarnath Honnavalli Anantharamaiah
What I have to do if I get the following message $ perldoc NET::FTP No documentation found for "NET::FTP". Does this mean that there is no NET::FTP module on my box or there is no documentation available for this or the path is not set for getting the documentation. How do I do that. How can I k

Rookie Question

2001-04-23 Thread Goodman Kristi - kgoodm
I have this line of code in my program: print "Did everything look ok? (Y/N)"; chomp ($check = ); $check = "\U$check"; if ("\U$check" ne "Y") {die "Well. . . go back and try again until you get it right!!!\n"}; How would I fix it where the user did not have to ENTER after they typed a Y or N.