Re: Can't use string ("1") as a HASH ref while "strict refs" in use at ./policy.sanitizer line 255.

2009-10-09 Thread Shawn H Corey
Noah wrote: > Hi there, > > I am trying to figure out why the following lines are giving me an error: > > > --- snip --- > > $found{filter}{$filter}{family}{$family} = 1; > print keys %{ $found{filter}{$filter}{family} }; > > > --- snip > > here's the error > >

Re: Can't use string ("1") as a HASH ref while "strict refs" in use at ./policy.sanitizer line 255.

2009-10-09 Thread Jim Gibson
On 10/9/09 Fri Oct 9, 2009 2:12 PM, "Noah" scribbled: > Hi there, > > I am trying to figure out why the following lines are giving me an error: > > > --- snip --- > > $found{filter}{$filter}{family}{$family} = 1; > print keys %{ $found{filter}{$filter}{family} }; >

Can't use string ("1") as a HASH ref while "strict refs" in use at ./policy.sanitizer line 255.

2009-10-09 Thread Noah
Hi there, I am trying to figure out why the following lines are giving me an error: --- snip --- $found{filter}{$filter}{family}{$family} = 1; print keys %{ $found{filter}{$filter}{family} }; --- snip here's the error Can't use string ("1") as a HASH ref while

Re: Mysql and storage

2009-10-09 Thread Ian
On Fri, Oct 9, 2009 at 12:24 PM, Noah wrote: > Hi there, > > I am just starting with Mysql and perl and would like to know how to store > things in a database. Is there any suggested existing code out there that > does this already that I can view to get an understanding of the data > structures

Mysql and storage

2009-10-09 Thread Noah
Hi there, I am just starting with Mysql and perl and would like to know how to store things in a database. Is there any suggested existing code out there that does this already that I can view to get an understanding of the data structures? Is there a good how to help page out there? Cheer

Re: for output from other unix commands

2009-10-09 Thread Jim Gibson
On 10/9/09 Fri Oct 9, 2009 7:43 AM, "Harry Putnam" scribbled: > I'm thinking of splitting on something like ' +' (+) since > no regular output will have 2 spc or more between connected > words I mean words that belong in a group. I would use the construct /\s{2,}/ for "two or more spaces"

Re: for output from other unix commands

2009-10-09 Thread Harry Putnam
Jim Gibson writes: > You might try splitting the line on whitespace, extracting the first two and > last two elements, then joining the remainder back with a space. You can > then test the length of the middle string for excessive length and print or > trim accordingly. This will concatenate any

Re: Database Help

2009-10-09 Thread Dave Tang
On Sat, 10 Oct 2009 00:07:01 +1000, Jyoti wrote: Hello All, I am able to connect to postgreSQL database via my server. I used PHP to connect .. now i wanna know how to create databases via php and access queries so that i get the results on my server. I have to make php scripts. But where shou

Database Help

2009-10-09 Thread Jyoti
Hello All, I am able to connect to postgreSQL database via my server. I used PHP to connect .. now i wanna know how to create databases via php and access queries so that i get the results on my server. I have to make php scripts. But where should I make .. in already existing script where it conn

Re: Need explanation about this code.

2009-10-09 Thread Raheel Hassan
Thanks Rob, Jim and all others who helped me in explaining this code. On Fri, Oct 9, 2009 at 1:06 PM, Rob Coops wrote: > > > On Fri, Oct 9, 2009 at 9:58 AM, Raheel Hassan wrote: > >> Thanks Jim for a nice reply, could you explain what >> push(@$temp_table,$ref->[$i]); is doing. in the first code

Re: Building a record on the fly via hash of hashes

2009-10-09 Thread Paul Johnson
On Fri, Oct 09, 2009 at 02:57:44PM +0530, Soham Das wrote: > Yes,indeed after you pointed out to me, I (figuratively) kicked myself. But those quotes are still ugly and unnecessary, as John showed. -- Paul Johnson - p...@pjcj.net http://www.pjcj.net -- To unsubscribe, e-mail: beginners-unsubs

Re: Need explanation about this code.

2009-10-09 Thread Rob Coops
On Fri, Oct 9, 2009 at 9:58 AM, Raheel Hassan wrote: > Thanks Jim for a nice reply, could you explain what > push(@$temp_table,$ref->[$i]); is doing. in the first code. > > In the second @_= $dbh where as in the if command $_ is getting the values > from this default array. Then how it can return

Re: Building a record on the fly via hash of hashes

2009-10-09 Thread Soham Das
Philip, I think, the way you went about solving the problem {might be very trivial for you}, but laying bare your entire thought process, just taught something to me. Thanks and I am sure, many other beginners have picked it up from here. Yes,indeed after you pointed out to me, I (figurative

Re: Building a record on the fly via hash of hashes

2009-10-09 Thread Philip Potter
2009/10/9 Soham Das : > When I compile this, it gives me an error like this: > > Can't modify constant item in scalar assignment at Test.pl line 18, near "}"; > > So for the sake of clarity I highlited the Line 18. > > 'Action'=$trades->{'Action'}, > > A bit of help in this, will be great! When pe

Re: Need explanation about this code.

2009-10-09 Thread Raheel Hassan
Thanks Jim for a nice reply, could you explain what push(@$temp_table,$ref->[$i]); is doing. in the first code. In the second @_= $dbh where as in the if command $_ is getting the values from this default array. Then how it can return \%s..in the last statement. On Thu, Oct 8, 2009 at 6

Re: Building a record on the fly via hash of hashes

2009-10-09 Thread Soham Das
Is this code better? I noticed, you missed some inverted commas, So, at the risk of being pedantic, I am appending the code: #!/usr/bin/perl use strict; use warnings; use Tie::Handle::CSV; my $qbook = Tie::Handle::CSV->new('C:\Documents and Settings\Soham Das\Desktop\Quotes.csv',header=>1); my

Re: Building a record on the fly via hash of hashes

2009-10-09 Thread Soham Das
yes, I actually understood the problem but didnt have the "brainwave" to solve it. Now its much better. Yes indeed this will work much better. Thank you, John From: John W. Krahn To: Perl Beginners Sent: Fri, 9 October, 2009 11:57:09 AM Subject: Re: Buildin