button tag?

2010-04-12 Thread Fabian Gut
Hello How do I create a button tag? print $q-button(); creates an input type=button tag and print $q-start_button(); gives an error: Undefined subroutine CGI::start_button Best regards Fabian Gut -- To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org For additional commands,

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 04:31, Uri Guttman u...@stemsystems.com wrote: AM == Abimael Martinez abijr@gmail.com writes:  AM   print {$tmp} $div_start; no need for the {} around a single scalar handle. But it *does* comply with Perl Best Practices #136. * It makes the filehandle obviously

Re: Subroutine doesn't write to file

2010-04-12 Thread Uri Guttman
PP == Philip Potter philip.g.pot...@gmail.com writes: PP On 12 April 2010 04:31, Uri Guttman u...@stemsystems.com wrote: AM == Abimael Martinez abijr@gmail.com writes:  AM   print {$tmp} $div_start; no need for the {} around a single scalar handle. PP But it *does*

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 07:55, Uri Guttman u...@stemsystems.com wrote: PP == Philip Potter philip.g.pot...@gmail.com writes:  PP On 12 April 2010 04:31, Uri Guttman u...@stemsystems.com wrote:   AM == Abimael Martinez abijr@gmail.com writes:      AM   print {$tmp} $div_start;     no need for

Re: Subroutine doesn't write to file

2010-04-12 Thread Uri Guttman
PP == Philip Potter philip.g.pot...@gmail.com writes: PP On 12 April 2010 07:55, Uri Guttman u...@stemsystems.com wrote: PP == Philip Potter philip.g.pot...@gmail.com writes:  PP On 12 April 2010 04:31, Uri Guttman u...@stemsystems.com wrote:   AM == Abimael Martinez

html print

2010-04-12 Thread Chris Coggins
I'm having trouble getting a piece of data from a form input to print in html. Here's the relevant portion of my code sub subroutine { my($hash) = shift; my($data) = $hash-{'expl'}; print Content-type: text/html\n\n; print STOPHTML; div class=empdataThis employee has $data/div STOPHTML } The

AW: html print

2010-04-12 Thread Thomas Bätzler
Chris Coggins cacogg...@cox.net asked: I'm having trouble getting a piece of data from a form input to print in html. Here's the relevant portion of my code sub subroutine { my($hash) = shift; my($data) = $hash-{'expl'}; print Content-type: text/html\n\n; print STOPHTML; div

Re: How ro specify path in use lib qw()

2010-04-12 Thread Shlomi Fish
Hi Mimi, On Monday 12 Apr 2010 02:32:12 Mimi Cafe wrote: My program is in the same directory as my module directory, but when I use relative path in use lib, Perl doesn't find the module. use lib qw(MyModule/), use lib qw(./MyModule/), use lib qw(MyModule) or use lib qw(./MyModule/) #

Re: Subroutine doesn't write to file

2010-04-12 Thread Shlomi Fish
Hi Uri and Philip (and Abimael), On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: PP == Philip Potter philip.g.pot...@gmail.com writes: PP On 12 April 2010 07:55, Uri Guttman u...@stemsystems.com wrote: PP == Philip Potter philip.g.pot...@gmail.com writes: PP On 12 April 2010

Re: html print

2010-04-12 Thread Shlomi Fish
Hi Chris, A few comments on your code - some of which may help you. On Monday 12 Apr 2010 12:06:16 Chris Coggins wrote: I'm having trouble getting a piece of data from a form input to print in html. Here's the relevant portion of my code sub subroutine { I hope you didn't call your

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 11:34, Shlomi Fish shlo...@iglu.org.il wrote: Hi Uri and Philip (and Abimael), On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote:   PP Where did I say PBP was always right? I just didn't want to let your   PP style argument be the only one in this thread, since there are

Re: html print

2010-04-12 Thread Chris Coggins
Shlomi Fish wrote: Hi Chris, A few comments on your code - some of which may help you. On Monday 12 Apr 2010 12:06:16 Chris Coggins wrote: I'm having trouble getting a piece of data from a form input to print in html. Here's the relevant portion of my code sub subroutine { I hope

Re: Fifo Queue Job Scheduler

2010-04-12 Thread Rene Schickbauer
Him Joseph! I need something to read max 30 or so chars from a named pipe and execute my script with that keyword. Something that I can daemonize with an init script. Seen anything similar that can be bent into shape? Hmm, daemonizing perl scripts was discussed on PerlMonks, for example

parse xml

2010-04-12 Thread vyomesh Kulkarni
hello I am trying to parse my xml file which looks like below. its a test case structure. each test case can have multiple actions. Testsuite TestCase Action run_cmd= Args=@arr1 %22+args=...@arr1 Prompt=ok Ret_values=reference1/Action Action run_cmd= Args=@arr2 %22+args=...@arr2, $ref1

Re: String length limits?

2010-04-12 Thread Rene Schickbauer
Hi! Perl has no string length limit. You are only limited by the amount of memory that is available. If your program is misbehaving then I fear it is the programs error (or well the person that wrote it ;-) rather then perl or any limit on the length of a string. And as for the current

Re: about split and \d or . (.)

2010-04-12 Thread Shawn H Corey
Harry Putnam wrote: What I'm working on will eventually be a script that reads an `events' file and lets me know about events I've entered there. It's my own primitive but hopefully effective calendar reminder type of tool. The format of entries look like this: cat ~/.events ev 100411 4

Re: [Was XS linker]

2010-04-12 Thread Rene Schickbauer
Pry, Jeffrey wrote: Indeed. Patience and a willingness to repeat one's self was one of this list assets but that seems to be in short supply these days. We also seem to have lost one or two regular contributors. I can attest to this. After having the LAW passed to me by Rudd telling me I

Re: about split and \d or . (.)

2010-04-12 Thread Harry Putnam
John W. Krahn jwkr...@shaw.ca writes: [...] ev 100411 4 Wash behind ears ev ev 100421 4 Avoid a beating by taking out the garbage this evening. ev [...] The multidigit numbers represents YYMMDD, John K. wrote: If we have learned anything from Y2K it is that

Re: Subroutine doesn't write to file

2010-04-12 Thread Shlomi Fish
On Monday 12 Apr 2010 13:59:31 Philip Potter wrote: On 12 April 2010 11:34, Shlomi Fish shlo...@iglu.org.il wrote: Hi Uri and Philip (and Abimael), On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote: PP Where did I say PBP was always right? I just didn't want to let your PP style

Re: about split and \d or . (.)

2010-04-12 Thread Harry Putnam
Shawn H Corey shawnhco...@gmail.com writes: Harry Putnam wrote: What I'm working on will eventually be a script that reads an `events' file and lets me know about events I've entered there. It's my own primitive but hopefully effective calendar reminder type of tool. The format of entries

Re: html print

2010-04-12 Thread Shlomi Fish
Hi Shawn, I hope it's OK that I CC the list on it. On Monday 12 Apr 2010 15:37:02 Shawn H Corey wrote: Shlomi Fish wrote: {{{ my $hash = shift; }}} Always put the array after a shift: my $hash = shift @_; Well, you don't need to in this case as shift; inside a subroutine

Re: about split and \d or . (.)

2010-04-12 Thread Shawn H Corey
Harry Putnam wrote: Shawn H Corey shawnhco...@gmail.com writes: Harry Putnam wrote: What I'm working on will eventually be a script that reads an `events' file and lets me know about events I've entered there. It's my own primitive but hopefully effective calendar reminder type of tool. The

Re: html print

2010-04-12 Thread Shawn H Corey
Shlomi Fish wrote: Because people often don't know for sure what is the right way, and confuse it. On the other hand, people don't normally think that shift; How do you know what people think? You're assuming because it's easy for you, it will be easy for everyone. -- Just my 0.0002

Re: about beginner perl site and developing skill

2010-04-12 Thread Shlomi Fish
Hi Harry! On Tuesday 06 Apr 2010 18:56:44 Harry Putnam wrote: [This message was inadvertently originally posted in a totally inappropriate group, so reposted here where it was supposed to have gone] [SNIP] On the other hand, I am capable of writing semi complex programs and have written

Re: Subroutine doesn't write to file

2010-04-12 Thread Uri Guttman
PP == Philip Potter philip.g.pot...@gmail.com writes: PP On 12 April 2010 11:34, Shlomi Fish shlo...@iglu.org.il wrote: Hi Uri and Philip (and Abimael), On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote:   PP Where did I say PBP was always right? I just didn't want to let your   PP

Re: Subroutine doesn't write to file

2010-04-12 Thread Philip Potter
On 12 April 2010 16:39, Uri Guttman u...@stemsystems.com wrote: PP == Philip Potter philip.g.pot...@gmail.com writes:  PP On 12 April 2010 11:34, Shlomi Fish shlo...@iglu.org.il wrote:   Hi Uri and Philip (and Abimael),   On Monday 12 Apr 2010 10:32:36 Uri Guttman wrote:     PP Where did I

Re: html print

2010-04-12 Thread John W. Krahn
Shlomi Fish wrote: On Monday 12 Apr 2010 12:06:16 Chris Coggins wrote: print STOPHTML; You should always say STOPHTML 'STOPHTML' `STOPHTML` etc. with explicit quotes depending on what you say. Otherwise, you may not be sure that it's doing the right thing (nor will your readers). As a

Re: about split and \d or . (.)

2010-04-12 Thread Brandon McCaig
On Mon, Apr 12, 2010 at 9:45 AM, Harry Putnam rea...@newsguy.com wrote: Shawn H Corey shawnhco...@gmail.com writes: Perhaps you should consider writing the data in XML: I guess you're thinking of some automated way to enter the necessary info eh? I mean it looks like a heck of a lot more

Re: about split and \d or . (.)

2010-04-12 Thread Shawn H Corey
Harry Putnam wrote: I mean it looks like a heck of a lot more typing.. Or a much more complex abbrev expansion. Sorry but if you plan a career in programming, you're going to be doing a lot of typing. :) -- Just my 0.0002 million dollars worth, Shawn Programming is as much about

Re: [Was XS linker]

2010-04-12 Thread Jenda Krynicky
From: Rene Schickbauer rene.schickba...@gmail.com Some of the rules doesn't even make sense anymore, like the four-line-signature: Most people - when using their company mail account - are forced by local law to include a number of information (address, telephone number, company chairman,

Re: [Was XS linker]

2010-04-12 Thread Rene Schickbauer
Jenda Krynicky wrote: Hi! Many of us can't deal with the changes that happen in the past decade, either because we are old or because we are perfectionist, or both. I used to be one of those people, but i have grown up. Grown up or grown tired? A little of both, i guess. When i was

Re: Getting a subroutine reference from an object instance

2010-04-12 Thread Eric Veith1
Peter Scott pe...@psdt.com wrote on 04/10/2010 03:33:46 PM: You'd probably benefit from taking this to a Moose list. Good idea. Thanks for all the help, especially to Shlomi, who pointed out the $instance-can('foo') solution. Eric -- Eric MSP Veith

Re: String length limits?

2010-04-12 Thread Owen
On Mon, 12 Apr 2010 13:52:16 +0200 Rene Schickbauer rene.schickba...@gmail.com wrote: Hi! Perl has no string length limit. You are only limited by the amount of memory that is available. If your program is misbehaving then I fear it is the programs error (or well the person that

Re: String length limits?

2010-04-12 Thread John W. Krahn
Owen wrote: On Mon, 12 Apr 2010 13:52:16 +0200 Rene Schickbauer rene.schickba...@gmail.com wrote: Perl has no string length limit. You are only limited by the amount of memory that is available. If your program is misbehaving then I fear it is the programs error (or well the person that

Re: about split and \d or . (.)

2010-04-12 Thread Harry Putnam
Harry Putnam wrote: I mean it looks like a heck of a lot more typing.. Or a much more complex abbrev expansion. Sorry but if you plan a career in programming, you're going to be doing a lot of typing. :) Hehe... there is that. seriously though, this is a personal use only event

Re: about split and \d or . (.)

2010-04-12 Thread Harry Putnam
Shawn H Corey shawnhco...@gmail.com writes: [...] Yikes, I'll be a week with perlre to get even close to following that. In fact I don't really understand whats happening there at all. Also it doesn't appear to work with the data I posted unless the $extra is present, and that is supposed

Re: about split and \d or . (.)

2010-04-12 Thread Uri Guttman
HP == Harry Putnam rea...@newsguy.com writes: HP Shawn H Corey shawnhco...@gmail.com writes: HP [...] Yikes, I'll be a week with perlre to get even close to following that. In fact I don't really understand whats happening there at all. Also it doesn't appear to work with the

[Meta] On style disagreements

2010-04-12 Thread Peter Scott
Personal opinion and personal plea here on practices for experts to follow on a beginners' list. Please take it in its intended constructive spirit from someone who's been teaching Perl for 11 years. Follow the old adage of be strict in what you emit and liberal in what you accept. In

Pattern matching problem - Why won't this work?

2010-04-12 Thread Owen Chavez
Hello! I have a pattern matching question using Perl 5.10, Windows 7. Suppose I have a file containing the following block of text: Hello there TODD I my We Us ourselves OUr I. The file has 10 words, including 7 first-person pronouns (and 3 non-pronouns that I have no interest in). I've

Re: Pattern matching problem - Why won't this work?

2010-04-12 Thread Peter Scott
On Mon, 12 Apr 2010 21:06:58 -0500, Owen Chavez wrote: I have a pattern matching question using Perl 5.10, Windows 7. Suppose I have a file containing the following block of text: Hello there TODD I my We Us ourselves OUr I. The file has 10 words, including 7 first-person pronouns (and 3

Incrementing letters in for loop

2010-04-12 Thread Magne Sandøy
Hi. I'm new to perl, and I stumbled across a strange behavior in my for loop. In the following code, the second for loop actually counts way passed what I expected, and actually stops at yz and not z as expected. As shown by the third for loop, incrementing the letters, seems to give me the

Re: Pattern matching problem - Why won't this work?

2010-04-12 Thread Owen Chavez
Thank you for the feedback. I do apologize for not posting a working example; I can't post the full code and I was attempting to extract the offending sections. I have no particular fondness for grep. A search of postings on perlmonks revealed a variation of the code I employed. I am learning