Re: problems with 'require'

2009-11-30 Thread Matt Whipple
Paweł Prędki wrote: file mydbtest.pm package dbredwings; For organization reasons, you should probably make the package name match the file name my $platform = mysql; my $database = dbplayers; my $host = localhost; my $tablename = players; my $user = player; my

Re: problems with 'require'

2009-11-30 Thread Matt Whipple
Paweł Prędki wrote: I changed all the permissions and what I get now is that everything works fine but whenever I make changes to the .pm file I need to restart the server that is running locally for the changes to be seen in my main script... This is not the case on the live target server

CGI programming

2009-11-30 Thread Anant Gupta
I am not allowed to write to /var/www/cgi-bin/ I am not the root user of my machine Is their any way i can try out my perl cgi programs on this machine( Red Hat Linux) Anant

Re: CGI programming

2009-11-30 Thread lan messerschmidt
On Mon, Nov 30, 2009 at 5:39 PM, Anant Gupta anantgupta...@gmail.com wrote: I am not allowed to write to /var/www/cgi-bin/ I am not the root user of my machine Is their any way i can try out my perl cgi programs on this machine( Red Hat Linux) That's decided by the http server's config.

Re: CGI programming

2009-11-30 Thread Philip Potter
2009/11/30 Anant Gupta anantgupta...@gmail.com: I am not allowed to write to /var/www/cgi-bin/ I am not the root user of my machine Is their any way i can try out my perl cgi programs on this machine( Red Hat Linux) Ask the root user of your machine. As an example of how these things work,

Re: how to write a debug-print sub with one argument?

2009-11-30 Thread Mark_Galeck
OK, I tried SmartComments, I must not be understanding something, I followed the man page exactly, but it does not seem to work: use Smart::Comments; sub foobar { ### at loc... ### $_[0] } foobar 1; and when I run this I get ### at loc... ### $_[0] : undef so both of these lines appear to

Re: why can't I collapse reference variable?

2009-11-30 Thread Mark_Galeck
Thank you very much Charles I appreciate! Mark -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Autovivification of hash from an array

2009-11-30 Thread Dr.Ruud
Shawn H Corey wrote: use Data::Dumper; # Make Data::Dumper pretty $Data::Dumper::Sortkeys = 1; $Data::Dumper::Indent = 1; # Set maximum depth for Data::Dumper, zero means unlimited $Data::Dumper::Maxdepth = 0; Variant: use Data::Dumper; {package

Re: reference to anonymous array, references last element instead??

2009-11-30 Thread Mark_Galeck
thank you very much everybody! I appreciate your help. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Perl - Read and Write Multi-Language text (Scandanavian,German)

2009-11-30 Thread Dr.Ruud
CM wrote: s/0x([\d+A-Fa-f]{2})/\\x$1/ge The \d matches much more codepoints than you think. Rewrite that also can do 0x400x3C0: s/(?=0x[[:xdigit:]])/\x{0}/g; s/\x{0}(0x[[:xdigit:]]+)/chr hex $1/ge; -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional

Re: Autovivification of hash from an array

2009-11-30 Thread Shawn H Corey
Dr.Ruud wrote: Shawn H Corey wrote: use Data::Dumper; # Make Data::Dumper pretty $Data::Dumper::Sortkeys = 1; $Data::Dumper::Indent = 1; # Set maximum depth for Data::Dumper, zero means unlimited $Data::Dumper::Maxdepth = 0; Variant: use Data::Dumper; {package

Re: dcc chat example

2009-11-30 Thread Jay Savage
On Fri, Nov 27, 2009 at 6:29 AM, Shlomi Fish shlo...@iglu.org.il wrote: [snip] Hi Marco, [snip] Net::IRC - DEPRECATED Perl interface to the Internet Relay Chat protocol USE THESE INSTEAD ^ This module has been abandoned and is no longer developed. This release serves only to warn current

Re: return {}-{'name'};

2009-11-30 Thread Dermot
2009/11/24 Randal L. Schwartz mer...@stonehenge.com: Dermot == Dermot  paik...@googlemail.com writes: ... Dermot I guess the question is: Will the declaration of our %cache within a Dermot function-orientated sub-routine render it always uninitialized? I believe what you are seeing is

do something after time expired

2009-11-30 Thread David Schmidt
Hello I would like to execute some Code after a certain amount of time has passed (then restart the timer but with a different time value) I looked at IO::Async::Timer::Countdown but this timer only gets started when used with a IO::Async::Loop. Basically I am looking for something as simple as

Re: return {}-{'name'};

2009-11-30 Thread Randal L. Schwartz
Dermot == Dermot paik...@googlemail.com writes: Dermot One more question If I can. Chas pointed me to Dermot http://perldesignpatterns.com/?PerlDesignPatterns some time ago. I Dermot suspect that the above is a form of design pattern. Does it have a Dermot name? Is there a reference to it at

Re: do something after time expired

2009-11-30 Thread Erez Schatz
2009/11/30 David Schmidt zivildie...@gmail.com: Hello I would like to execute some Code after a certain amount of time has passed (then restart the timer but with a different time value) Basically I am looking for something as simple as my $do_it = { ... }; use MyTimer; my timer =

Re: do something after time expired

2009-11-30 Thread David Schmidt
On Mon, Nov 30, 2009 at 4:55 PM, Erez Schatz moonb...@gmail.com wrote: 2009/11/30 David Schmidt zivildie...@gmail.com: Hello I would like to execute some Code after a certain amount of time has passed (then restart the timer but with a different time value) Basically I am looking for

Re: do something after time expired

2009-11-30 Thread Jay Savage
On Mon, Nov 30, 2009 at 10:45 AM, David Schmidt zivildie...@gmail.com wrote: Hello I would like to execute some Code after a certain amount of time has passed (then restart the timer but with a different time value) I looked at IO::Async::Timer::Countdown but this timer only gets started

Re: do something after time expired

2009-11-30 Thread David Schmidt
2009/11/30 Jay Savage daggerqu...@gmail.com: On Mon, Nov 30, 2009 at 10:45 AM, David Schmidt zivildie...@gmail.com wrote: Hello I would like to execute some Code after a certain amount of time has passed (then restart the timer but with a different time value) I looked at

Re: do something after time expired

2009-11-30 Thread John W. Krahn
David Schmidt wrote: 2009/11/30 Jay Savage daggerqu...@gmail.com: Either way, you should be able to use the built-in functions to accomplish your task. See the docs for sleep(), alarm(), and select() for more info. Sorry for the bad explanation of my problem. Yes my program has to continue

Re: PRINT LAST ENTRY IN A FILE

2009-11-30 Thread Dr.Ruud
raphael() wrote: I want to print the last entry by record in this file records.txt grep ^ records.txt |tail -n1 perl -ne '$s=$_ if/^/}{print$s' records.txt -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: Re: escape quotes in GREP

2009-11-30 Thread juliaaaa . 1
Thanks everyone for the help!!! really useful!!! On Nov 30, 2009 1:48am, lan messerschmidt lan.messerschm...@gmail.com wrote: On Mon, Nov 30, 2009 at 3:46 PM, Uri Guttman u...@stemsystems.com wrote: what is [^()]* looking for? why couldn't () be inside the div tags? Well,

Re: do something after time expired

2009-11-30 Thread David Schmidt
On Mon, Nov 30, 2009 at 5:57 PM, John W. Krahn jwkr...@shaw.ca wrote: David Schmidt wrote: 2009/11/30 Jay Savage daggerqu...@gmail.com: Either way, you should be able to use the built-in functions to accomplish your task. See the docs for sleep(), alarm(), and select() for more info.

Re: do something after time expired

2009-11-30 Thread Jay Savage
On Mon, Nov 30, 2009 at 1:42 PM, David Schmidt zivildie...@gmail.com wrote: On Mon, Nov 30, 2009 at 5:57 PM, John W. Krahn jwkr...@shaw.ca wrote: David Schmidt wrote: Yes my program has to continue while waiting for the timeout. You code example doesn't work for me because my program is an