Re: shift oo

2011-03-19 Thread Uri Guttman
> "sw" == shawn wilson writes: uri> please keep the various things clear. the original code you uri> posted (without the surrounding sub) was not OO, nor a closure, uri> nor an event handler. your original question was about shift->() uri> and only that. >> don't uri> keep wanderi

foreach loop

2011-03-19 Thread Chris Stinemetz
I am trying to code a foreach loop, that will add all occurrences of the element rlptxat that have the same elements cell, sect and chan. My failed attempt can be located in between the ### lines. Below is what I have so far. Thank you in advance, Chris #!/usr/bin/perl use warnings; use stri

Re: shift oo

2011-03-19 Thread shawn wilson
On Sat, Mar 19, 2011 at 10:46 PM, Uri Guttman wrote: > > "sw" == shawn wilson writes: > > sw> thank you all. i have a much better grasp on what this means > sw> now. at least i know why i had trouble with it - i didn't (don't) > sw> understand closures. and, i am not used to event driven

Re: File/Slurp module

2011-03-19 Thread Uri Guttman
> "CS" == Chris Stinemetz writes: CS> Uri, CS> When I try to parse one of my raw files I get the following error: CS> Out of memory during "large" request for 536875008 bytes, total sbrk() is 880640 bytes at /usr/lib/perl5/site_perl/5.10/ CS> File/Slurp.pm line 159. CS> Since yo

Re: shift oo

2011-03-19 Thread Uri Guttman
> "sw" == shawn wilson writes: sw> thank you all. i have a much better grasp on what this means sw> now. at least i know why i had trouble with it - i didn't (don't) sw> understand closures. and, i am not used to event driven sw> programming. the example comes from psgi which (general

Re: perl -MCPAN -e "install Glib"

2011-03-19 Thread czubatka
Hi, Try to wait some time after making force install then press ctrl-c if it doesn't end installation by itself. You will receive info that "make_test failed but failure ignored because 'force' in effect". Good questions are how long you need to wait until pressing ctrl-c( :) ) and what exact

Re: File/Slurp module

2011-03-19 Thread Brian Fraser
Googling your error: http://stackoverflow.com/questions/1918672/why-does-git-pm-on-cygwin-complain-about-out-of-memory-during-large-request Brian. On Sat, Mar 19, 2011 at 4:30 PM, Chris Stinemetz < cstinem...@cricketcommunications.com> wrote: > Uri, > > When I try to parse one of my raw files I

File/Slurp module

2011-03-19 Thread Chris Stinemetz
Uri, When I try to parse one of my raw files I get the following error: Out of memory during "large" request for 536875008 bytes, total sbrk() is 880640 bytes at /usr/lib/perl5/site_perl/5.10/ File/Slurp.pm line 159. Since you created the File::Slurp module I was curious if you knew what the fi

Re: shift oo

2011-03-19 Thread shawn wilson
thank you all. i have a much better grasp on what this means now. at least i know why i had trouble with it - i didn't (don't) understand closures. and, i am not used to event driven programming. the example comes from psgi which (generally) gets an event and gives you data. i've also been looking

Re: Parse Key=Val parameters with s///eg

2011-03-19 Thread Chap Harrison
On Mar 18, 2011, at 10:52 PM, Brian Fraser wrote: > There is no need to do it in a single expression, other than causing your > maintenance programmer some headache. Yes, that was certainly a challenge to follow! Might I conclude, then, that a lot of those Perl extensions are of dubious value

Re: printf explicitly

2011-03-19 Thread Uri Guttman
> "PJ" == Paul Johnson writes: >> 2,1,1,1175,2.58522727272727,1 >> 2,1,1,1175,, >> 2,1,1,1175,1.354167,1 >> 2,1,1,1175,1.82765151515152,1 >> 2,1,1,1175,, >> 2,2,1,1175,, >> 8,1,1,1175,, >> 10,2,1,1175,0.710227272727273,1 that is his output from MY version of the progr

Re: printf explicitly

2011-03-19 Thread Paul Johnson
On Fri, Mar 18, 2011 at 10:43:09PM -0600, Chris Stinemetz wrote: > Hello, > > I would like to explicitly use printf '<%.2g>' for the element in the array > called dist. > Below is the error I am getting and below that is a sample of the output I > can currently generate before I add printf. > >

Re: sub routine

2011-03-19 Thread Peter Scott
On Thu, 17 Mar 2011 19:25:02 -0600, Chris Stinemetz wrote: > Take the value of $data[261] and return the solution of: > $data[261]+13)/6.6/8/2*10)/10 Your expression there is missing left parentheses. If we guess at where to put them we end up with (($data[261]+13)/6.6/8/2*10)/10 wh

Re: shift oo

2011-03-19 Thread Peter Scott
On Fri, 18 Mar 2011 17:34:00 -0400, shawn wilson wrote: > here's the whole function (i didn't think i needed to post it because i > get the rest of this code): Your problem is less to do with Perl than it is with explaining what you need clearly. Clear thinking and clear communication lead to cl