Re: Reliably restarting "sleep"

2011-06-16 Thread C.DeRykus
On Jun 16, 3:00 pm, rvtol+use...@isolution.nl ("Dr.Ruud") wrote: > On 2011-06-16 19:16, C.DeRykus wrote: > > > > > Ruud: > >> C.DeRykus: > >>> Another solution, not necessarily more elegant, but > >>> more familiar to most  is an eval {} and alarm pair: > > >>> EVAL: { > >>>       eval { > >>>    

Re: Reliably restarting "sleep"

2011-06-16 Thread Dr.Ruud
On 2011-06-16 19:16, C.DeRykus wrote: Ruud: C.DeRykus: Another solution, not necessarily more elegant, but more familiar to most is an eval {} and alarm pair: EVAL: { eval { local $SIG{ ALRM } = sub { die "alarm"; }; local $SIG{ USR1 } = sub { die "usr1" };

Re: Hash or array & retrieving hash value

2011-06-16 Thread Rob Dixon
On 16/06/2011 18:03, Grant wrote: Depending on whether there are one or more sets of values, XML::Simple either creates a hash or an array, either of which are stored here: $parsed_response->{Label}->{Image} My code retrieves the correct value when it's an array but I'm not sure how to do the s

Re: Reliably restarting "sleep"

2011-06-16 Thread C.DeRykus
On Jun 16, 1:54 am, rvtol+use...@isolution.nl ("Dr.Ruud") wrote: > On 2011-06-15 14:18, C.DeRykus wrote: > > > [...]  mixing > > alarm/sleep is a bad idea. See: perldoc -f alarm. > > > Another solution, not necessarily more elegant, but > > more familiar to most  is an eval {} and alarm pair: > > >

Re: Hash or array & retrieving hash value

2011-06-16 Thread Uri Guttman
> "G" == Grant writes: >>  ForceArray => ['Image'] G> I tried that and it seems to behave the same as 'ForceArray => 1'. G> Everything seems to be forced into an array. that ForceArray should work as i have used it just like that. it will only force arrays of the keys you pass to it

Re: Hash or array & retrieving hash value

2011-06-16 Thread Grant
Depending on whether there are one or more sets of values, XML::Simple either creates a hash or an array, either of which are stored here: $parsed_response->{Label}->{Image} My code retrieves the correct value when it's an array but I'm not sure how to do the same

Re: perl alias

2011-06-16 Thread Mike McClain
On Sat, Jun 11, 2011 at 01:15:45PM -0700, Mike McClain wrote: > # set up an alias for the fastest prime generator > *primes = \&sieve_eratosthenese_lucky; > > and export primes but it doesn't work: > Undefined subroutine &main::primes called at ./primes.pl line 176 Brian, Uri thanks for you

Re: Reliably restarting "sleep"

2011-06-16 Thread Dr.Ruud
On 2011-06-15 14:18, C.DeRykus wrote: [...] mixing alarm/sleep is a bad idea. See: perldoc -f alarm. Another solution, not necessarily more elegant, but more familiar to most is an eval {} and alarm pair: EVAL: { eval { local $SIG{ ALRM } = sub { die "alarm"; }; loca

Re: Convert HTML to PDF

2011-06-16 Thread Dr.Ruud
On 2011-06-15 10:27, Ramprasad Prasad wrote: On 14 June 2011 20:39, Dr.Ruud wrote: On 2011-06-14 10:54, Ramprasad Prasad wrote: [...] way of creating PDF from HTML [...] I prefer to use webkit for this: https://code.google.com/p/wkhtmltopdf/ How can I put page breaks See the documenta

Re: Problem with SDL::Perl

2011-06-16 Thread Kartik Thakore
Adam what distro are you on? On Tue, 2011-06-14 at 13:54 -0700, Adam Fairbrother wrote: > $LD_LIBRARY_PATH was unset. I set it manually to the SDL Libs folder, and the > error no longer happens. My test picture dosn't show up, but I think that's > an issue I can hack through myself. > > Thanks

Re: AW: Problem with SDL::Perl

2011-06-16 Thread Kartik Thakore
Oh yeah you are right. Why is that happening? On Tue, 2011-06-14 at 22:56 +0200, Tobias Leich wrote: > Its not looking good imo. > > See, its just installing libjpeg.la, not libjpeg.so.8 ... > > -Ursprüngliche Nachricht- > Von: Kartik Thakore [mailto:thakore.kar...@gmail.com] > Gesendet

AW: Problem with SDL::Perl

2011-06-16 Thread Tobias Leich
Its not looking good imo. See, its just installing libjpeg.la, not libjpeg.so.8 ... -Ursprüngliche Nachricht- Von: Kartik Thakore [mailto:thakore.kar...@gmail.com] Gesendet: Dienstag, 14. Juni 2011 22:19 An: Adam Fairbrother Cc: beginners@perl.org; sdl-devel Betreff: Re: Problem with SDL

Re: Problem with SDL::Perl

2011-06-16 Thread Kartik Thakore
Hmm that is all fine. Can I see your LD_LIBRARY_PATH? echo $LD_LIBRARY_PATH Are you still getting the problem btw cause the tests run fine. On Tue, 2011-06-14 at 09:47 -0700, Adam Fairbrother wrote: > My bad, I guess I glossed by the sdl-de...@perl.org list when I was looking > through. > >