Re: Map function, what does it do?

2011-01-11 Thread Brian Fraser
Rob, I'm going to answer the middle part of your mail first, hopefully you won't mind: > On Tue, Jan 11, 2011 at 3:56 PM, Rob Dixon wrote: > The link you supply talks about recent versions of push, pop, etc. > working on array references as well as arrays, so that the code could > also be writt

Re: what's the advantage of ORM?

2011-01-11 Thread Octavian Rasnita
From: "jbiskofski" > What happens when you need to make some really complex queries, with a few > joins of different types, group by's and aggregates? Is it still possible? > Of course it is possible. The query might look like: my $users = $schema->resultset('Users')->search({ birthday => {-

Re: Map function, what does it do?

2011-01-11 Thread Rob Dixon
On 11/01/2011 14:30, Brian Fraser wrote: On Tue, Jan 11, 2011 at 10:19 AM, John W. Krahn wrote: foreach (@arr) { push @new, $_; } Trying to use a scalar as the first argument to push will result in an error message. Doesn't make the original any less wrong, but as an aside, that's no lo

Re: Map function, what does it do?

2011-01-11 Thread Brian Fraser
On Tue, Jan 11, 2011 at 10:19 AM, John W. Krahn wrote: > foreach (@arr) { > push @new, $_; > } > > Trying to use a scalar as the first argument to push will result in an > error message. > > Doesn't make the original any less wrong, but as an aside, that's no longer true on 5.13.7+ Perls. http:/

Re: what's the advantage of ORM?

2011-01-11 Thread jbiskofski
What happens when you need to make some really complex queries, with a few joins of different types, group by's and aggregates? Is it still possible? On Tue, Jan 11, 2011 at 5:02 AM, Octavian Rasnita wrote: > From: "Sean Murphy" > > Hi >> >> With this class, can you build relationships with it?

RE: How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-11 Thread Bob McConnell
From: Saqib Ali > I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() > > I keep getting this error: > > "Callback called exit at XML/XPath/Node/Element.pm at line 144 during > global destruction." > > I'm using Windows XP. So I watched the task-management memory meter > during t

Re: Map function, what does it do?

2011-01-11 Thread John W. Krahn
shawn wilson wrote: On Tue, Jan 11, 2011 at 4:57 AM, Sean Murphy wrote: Hi all. I have read the explaination of the Map function and it is still a mystry to myself on what it is for and when would you use it? All explainations I have seen in books and blogs don't make it clear. my @new = m

Re: calculate average

2011-01-11 Thread John W. Krahn
Dr.Ruud wrote: On 2011-01-08 03:16, S.F. wrote: I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? The

Re: Map function, what does it do?

2011-01-11 Thread shawn wilson
>> that is a poor explanation IMO. hell, i was going to give this which dereferences the reference of a reference DBI's selectall_arrayref returns so that i can later loop through it again and again with different parameters: my (@groups) = map {...@$_} @{ $dbh->selectall_arrayref("select distinc

Re: what's the advantage of ORM?

2011-01-11 Thread Octavian Rasnita
From: "Sean Murphy" Hi With this class, can you build relationships with it? so if I have a database that has five tables. table1 contains a list of book names, book type, etc. Table 2 contains book id and author id to establish a many to many relation ship with the author table with is ta

Re: Map function, what does it do?

2011-01-11 Thread Sean Murphy
Hi Uri Thanks for that. It makes more sense. I will have to play with it and see what type of results I can get. It might be useful when I use it when I have a lot of data being passed from captures of the routers I have to support and their show commands. Sean - Original Message -

Re: Map function, what does it do?

2011-01-11 Thread Uri Guttman
> "sw" == shawn wilson writes: sw> On Tue, Jan 11, 2011 at 4:57 AM, Sean Murphy wrote: >> Hi all. >> >> I have read the explaination of the Map function and it is still a mystry to >> myself on what it is for and when would you use it? >> >> All explainations I have seen in

Re: Map function, what does it do?

2011-01-11 Thread shawn wilson
On Tue, Jan 11, 2011 at 4:57 AM, Sean Murphy wrote: > Hi all. > > I have read the explaination of the Map function and it is still a mystry to > myself on what it is for and when would you use it? > > All explainations I have seen in books and blogs don't make it clear. > my @new = map {$_} @arr;

Re: what's the advantage of ORM?

2011-01-11 Thread Sean Murphy
Hi With this class, can you build relationships with it? so if I have a database that has five tables. table1 contains a list of book names, book type, etc. Table 2 contains book id and author id to establish a many to many relation ship with the author table with is table 3. Table 4 is th

Map function, what does it do?

2011-01-11 Thread Sean Murphy
Hi all. I have read the explaination of the Map function and it is still a mystry to myself on what it is for and when would you use it? All explainations I have seen in books and blogs don't make it clear. Sean -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional comm

How to avoid Out of Memory Errors when dealing with a large XML file?

2011-01-11 Thread Saqib Ali
Hi. I'm reading a large (57 MB) XML file Using XML::XPath::XMLParser() I keep getting this error: "Callback called exit at XML/XPath/Node/Element.pm at line 144 during global destruction." I'm using Windows XP. So I watched the task-management memory meter during the execution of this process.

Re: calculate average

2011-01-11 Thread Dr.Ruud
On 2011-01-08 03:16, S.F. wrote: I have a data file with n columns and r row. The first 3 columns and the first 5 rows are: 2 3 1 1 6 X 4 0 X X 8 X 5 X 5 The "X" means missing. How could I write a script to calculate the average by column and replace "X" with the average? The output should be

Re: IPC::Shareable issue

2011-01-11 Thread André
Hello, My problem was that I was creating the SM variable and after a bit the app was killing the current process witch destroyed the variable. Sorry (very long script), and thanks for your help. FR On Mon, Jan 10, 2011 at 12:38 PM, Michiel Beijen wrote: > Hi, > > I guess you should not really