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 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. Some of httpd.conf ma

Re: CGI programming

2009-11-30 Thread Philip Potter
2009/11/30 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) Ask the root user of your machine. As an example of how these things work, at my university I c

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 ... ### $_[0] } foobar 1; and when I run this I get ### at ... ### $_[0] : undef so both of these lines appear to not wo

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 Data::Dumper;our($Indent,$Sortkeys,$Terse,$

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 co

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; > {pac

Re: dcc chat example

2009-11-30 Thread Jay Savage
On Fri, Nov 27, 2009 at 6:29 AM, Shlomi Fish 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 and futu

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

2009-11-30 Thread Dermot
2009/11/24 Randal L. Schwartz : >> "Dermot" == Dermot   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 that %cache is per-child, so

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 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 Dermot> http:/

Re: do something after time expired

2009-11-30 Thread Erez Schatz
2009/11/30 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) > Basically I am looking for something as simple as > > my $do_it = { ... }; > use MyTimer; > my timer = MyTimer->new($dela

Re: do something after time expired

2009-11-30 Thread David Schmidt
On Mon, Nov 30, 2009 at 4:55 PM, Erez Schatz wrote: > 2009/11/30 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) > > >> Basically I am looking for something as simple as >> >> my

Re: do something after time expired

2009-11-30 Thread Jay Savage
On Mon, Nov 30, 2009 at 10:45 AM, David Schmidt 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 when used with a IO

Re: do something after time expired

2009-11-30 Thread David Schmidt
2009/11/30 Jay Savage : > On Mon, Nov 30, 2009 at 10:45 AM, David Schmidt 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 get

Re: do something after time expired

2009-11-30 Thread John W. Krahn
David Schmidt wrote: 2009/11/30 Jay Savage : 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 while waiting for the

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: beginners-h...@

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 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, it's the OP's idea, not m

Re: do something after time expired

2009-11-30 Thread David Schmidt
On Mon, Nov 30, 2009 at 5:57 PM, John W. Krahn wrote: > David Schmidt wrote: >> >> 2009/11/30 Jay Savage : >>> >>> 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 ex

Re: do something after time expired

2009-11-30 Thread Jay Savage
On Mon, Nov 30, 2009 at 1:42 PM, David Schmidt wrote: > On Mon, Nov 30, 2009 at 5:57 PM, John W. Krahn 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 entire >>> Catalyst applicatio