Re: Help on saving and retrieving data structures

2013-09-14 Thread *Shaji Kalidasan*
September 2013 6:01 PM Subject: Re: Help on saving and retrieving data structures On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following

Re: Help on saving and retrieving data structures

2013-09-14 Thread Shlomi Fish
Hi Shaji, On Sat, 14 Sep 2013 16:19:26 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: Dear David, Thanks for throwing light on the topic by citing the security implications of executing eval and also suggesting the industry standard 'JSON' for interoperability.  One should

Re: Help on saving and retrieving data structures

2013-09-14 Thread Dermot
++Storable On 14 September 2013 09:39, Shlomi Fish shlo...@shlomifish.org wrote: Hi Shaji, On Sat, 14 Sep 2013 16:19:26 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: Dear David, Thanks for throwing light on the topic by citing the security implications of executing

Re: Help on saving and retrieving data structures

2013-09-14 Thread Jimi Wills
Yes, I agree. Top answer! Can also consider YAML if you wanted to do a lot of manual editing of data, but probably JSON is best. Dr Jimi C Wills David Precious wrote in message news:20130913133147.0b88fbeb@columbia... On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan*

Help on saving and retrieving data structures

2013-09-13 Thread *Shaji Kalidasan*
Dear Perlers, I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message Global symbol %game requires explicit package name It is working fine without 'strict'. Please help [code] #Code for saving the data

Re: Help on saving and retrieving data structures

2013-09-13 Thread 'lesleyb'
On Fri, Sep 13, 2013 at 07:10:58PM +0800, *Shaji Kalidasan* wrote: Dear Perlers, I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message Global symbol %game requires explicit package name This message means

Re: Help on saving and retrieving data structures

2013-09-13 Thread *Shaji Kalidasan*
. --- From: 'lesleyb' lesl...@herlug.org.uk To: beginners@perl.org Sent: Friday, 13 September 2013 5:26 PM Subject: Re: Help on saving and retrieving data structures On Fri, Sep 13, 2013 at 07:10:58PM +0800, *Shaji

Re: Help on saving and retrieving data structures

2013-09-13 Thread *Shaji Kalidasan*
. --- From: Dr Jimi-Carlo Bukowski-Wills jbwi...@staffmail.ed.ac.uk To: *Shaji Kalidasan* shajiin...@yahoo.com Sent: Friday, 13 September 2013 5:12 PM Subject: Re: Help on saving and retrieving data structures Hi   It’s

Re: Help on saving and retrieving data structures

2013-09-13 Thread David Precious
On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message Global symbol %game requires explicit package name Others have

Re: Help on saving and retrieving data structures

2013-09-13 Thread 'lesleyb'
On Fri, Sep 13, 2013 at 01:31:47PM +0100, David Precious wrote: On Fri, 13 Sep 2013 19:10:58 +0800 (SGT) *Shaji Kalidasan* shajiin...@yahoo.com wrote: I am saving the data structure to a file and retrieving it back again, but, when I 'use strict' it is giving the following error message

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-13 Thread Randal L. Schwartz
Parag == Parag Kalra paragka...@gmail.com writes: Parag Do we have any Perl module which can parse any other perl script Parag (or module) and fetch information like total number of arrays Parag being used, total number of hashes, total number of scalar Parag variables etc and size information

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-09 Thread Shawn H Corey
On 12-02-08 05:20 PM, Parag Kalra wrote: Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc and size information (like total elements, total keys

Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Parag Kalra
Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc and size information (like total elements, total keys etc) for each data structure in that perl

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Steve Bertrand
On 2012.02.08 17:20, Parag Kalra wrote: Do we have any Perl module which can parse any other perl script (or module) and fetch information like total number of arrays being used, total number of hashes, total number of scalar variables etc and size information (like total elements, total keys

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Jeff Peng
于 2012-2-9 10:15, Steve Bertrand 写道: I would suspect that this would be something that would have to run against the file itself, even prior to compile. Curious task. Might I ask what the purpose of your desire is? I am also not sure what's the special purpuse of the OP. Some modules on

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Parag Kalra
By data-structures being used, I mean the data structures that are actually *declared* in the script. And is it possible to find at least the data-structures stats of the current script that is getting executed if no parser is available. For example if I have a big script or module and if I want

Re: Perl Module to parse any other Perl script/module to fetch stats about data-structures

2012-02-08 Thread Jeff Peng
于 2012-2-9 15:21, Parag Kalra 写道: By data-structures being used, I mean the data structures that are actually *declared* in the script. And is it possible to find at least the data-structures stats of the current script that is getting executed if no parser is available. For example if I

Efficient way to compare 2 data structures particularly hash

2011-04-30 Thread Parag Kalra
Hi, I am evaluating different approaches to compare data structures in Perl - i.e whether they are same or not. I am planning to start wit: 1. Data::Compare 2. And then found this - http://stackoverflow.com/questions/1273616/how-do-i-compare-two-hashes-in-perl-without-using-datacompare Any

Re: Efficient way to compare 2 data structures particularly hash

2011-04-30 Thread Rob Dixon
On 30/04/2011 19:22, Parag Kalra wrote: Hi, I am evaluating different approaches to compare data structures in Perl - i.e whether they are same or not. I am planning to start wit: 1. Data::Compare 2. And then found this - http://stackoverflow.com/questions/1273616/how-do-i-compare-two-hashes

Re: Efficient way to compare 2 data structures particularly hash

2011-04-30 Thread Paul Johnson
On Sat, Apr 30, 2011 at 11:22:57AM -0700, Parag Kalra wrote: Hi, I am evaluating different approaches to compare data structures in Perl - i.e whether they are same or not. I am planning to start wit: 1. Data::Compare 2. And then found this - http://stackoverflow.com/questions

Rendering data structures using CGI::Application

2009-06-29 Thread Steve Bertrand
I've been stuck for the last three hours trying to render the following data structure into my browser. I'm using CGI::Application, and CGI::Application::Plugin::PageBuilder. No matter what I do or try, I can not loop the structure into a template variable. I'm literally at wits end, and am

Re: Rendering data structures using CGI::Application

2009-06-29 Thread Gurunandan R. Bhat
How do you want the output to look? If you write in a sample output, I could help with the template to generate that output Regards On Mon, 2009-06-29 at 22:56 -0400, Steve Bertrand wrote: I've been stuck for the last three hours trying to render the following data structure into my browser.

Re: Rendering data structures using CGI::Application

2009-06-29 Thread Steve Bertrand
Gurunandan R. Bhat wrote: How do you want the output to look? If you write in a sample output, I could help with the template to generate that output I would be extremely delighted to even get the following rendered for now, given the Data::Dumper output below. If I had a decent example, then

Re: Rendering data structures using CGI::Application

2009-06-29 Thread Gurunandan R. Bhat
Sure. I think you would like to have the error messages next to the sub that threw them, but here is what you want: (NOT TESTED!!) In your module: my $messages = [ {text = 'quantity is undefined, zero or illegal'}, {text = 'amount is undefined or illegal'}, {text =

Re: Rendering data structures using CGI::Application

2009-06-29 Thread Steve Bertrand
Gurunandan R. Bhat wrote: Sure. I think you would like to have the error messages next to the sub that threw them, but here is what you want: (NOT TESTED!!) ..woot!!! Thank you ever so much. Although I inserted the data statically into my _render_error() method, the result is positive! Other

RE: references to complex data structures

2008-01-15 Thread Kevin Viel
-Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Monday, January 14, 2008 8:59 PM To: beginners@perl.org Cc: Kevin Viel Subject: Re: references to complex data structures Kevin Viel wrote: Consider the following anonymous array of anonymous arrays: my

references to complex data structures

2008-01-14 Thread Kevin Viel
Consider the following anonymous array of anonymous arrays: my $a = [ [ 00 , 01 ] , [ 10 , 11 ] ] ; I can print the first element of the first anonymous array: print $$a[ 0 ][ 0 ]\n ; or, equivalently, I can explicit use bracers to dereference it: print ${$a}[ 0 ][ 0 ]\n ;

Re: references to complex data structures

2008-01-14 Thread Gunnar Hjalmarsson
Kevin Viel wrote: Consider the following anonymous array of anonymous arrays: my $a = [ [ 00 , 01 ] , [ 10 , 11 ] ] ; I can print the first element of the first anonymous array: print $$a[ 0 ][ 0 ]\n ; or, equivalently, I can explicit use bracers to dereference it: print

Re: references to complex data structures

2008-01-14 Thread Rob Dixon
Kevin Viel wrote: Consider the following anonymous array of anonymous arrays: my $a = [ [ 00 , 01 ] , [ 10 , 11 ] ] ; I can print the first element of the first anonymous array: print $$a[ 0 ][ 0 ]\n ; or, equivalently, I can explicit use bracers to dereference it: print

Re: Accessing packed data structures

2007-03-14 Thread Jenda Krynicky
From: Dharshana Eswaran [EMAIL PROTECTED] I was going thro the topic Accessing packed data structures in the Perl Complete Reference Book. I came across this example: struct utmp { char ut_user[8]; /* User login name */ char ut_id[4]; /* /etc/inittab id */ char ut_line[12]; /* device name

Re: Accessing packed data structures

2007-03-14 Thread Chas Owens
On 3/14/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: snip The data which i need to pack and unpack to these elements are in hex format(0x0B 0x1C 0x34 etc). It is a string of hex bytes. Can i know about the format in which i need to supply the input? Coz i am unable to accept the hex

Re: [SPAM] Re: Accessing packed data structures

2007-03-14 Thread Vincent Li
On Wed, 14 Mar 2007, Dharshana Eswaran wrote: On 3/13/07, Tom Phoenix [EMAIL PROTECTED] wrote: On 3/13/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: I was going thro the topic Accessing packed data structures in the Perl Complete Reference Book. I came across this example: struct

Accessing packed data structures

2007-03-13 Thread Dharshana Eswaran
Hi all, I was going thro the topic Accessing packed data structures in the Perl Complete Reference Book. I came across this example: struct utmp { char ut_user[8]; /* User login name */ char ut_id[4]; /* /etc/inittab id */ char ut_line[12]; /* device name */ short ut_pid; /* process ID */ short

Re: Accessing packed data structures

2007-03-13 Thread Tom Phoenix
On 3/13/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: I was going thro the topic Accessing packed data structures in the Perl Complete Reference Book. I came across this example: struct utmp { char ut_user[8]; /* User login name */ char ut_id[4]; /* /etc/inittab id */ char ut_line[12

Re: Accessing packed data structures

2007-03-13 Thread John W. Krahn
Tom Phoenix wrote: On 3/13/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: I was going thro the topic Accessing packed data structures in the Perl Complete Reference Book. I came across this example: struct utmp { char ut_user[8]; /* User login name */ char ut_id[4]; /* /etc/inittab id

Re: Accessing packed data structures

2007-03-13 Thread Dharshana Eswaran
On 3/13/07, Tom Phoenix [EMAIL PROTECTED] wrote: On 3/13/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: I was going thro the topic Accessing packed data structures in the Perl Complete Reference Book. I came across this example: struct utmp { char ut_user[8]; /* User login name */ char

Re: Accessing packed data structures

2007-03-13 Thread Chas Owens
On 3/14/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: snip Now how do i come up with the pack template? I dont know how a enum should be represented in the pack template. :-( /I8(enum)I8i8I8/ = pack template The above mentioned enum just contains two elements. The data which i need to pack

Re: Accessing packed data structures

2007-03-13 Thread Dharshana Eswaran
On 3/14/07, Chas Owens [EMAIL PROTECTED] wrote: On 3/14/07, Dharshana Eswaran [EMAIL PROTECTED] wrote: snip Now how do i come up with the pack template? I dont know how a enum should be represented in the pack template. :-( /I8(enum)I8i8I8/ = pack template The above mentioned enum just

Can anyone guide me for : Data Structures in Perl

2005-07-17 Thread atul ashpalia
Hi, can anybody help me with a link or a tutorial for understanding the Datastructures in perl. Example, Array of Array, Hash of Array, Hash of Hash, Array of Hash. Along with few scripts to understand their application. thanks in advance, Atul Ashpalia

Re: Can anyone guide me for : Data Structures in Perl

2005-07-17 Thread Wijaya Edward
You can find everything you need in: perldoc perldsc -- Regards, Edward WIJAYA SINGAPORE can anybody help me with a link or a tutorial for understanding the Datastructures in perl. Example, Array of Array, Hash of Array, Hash of Hash, Array of Hash. -- To unsubscribe, e-mail:

Re: Can anyone guide me for : Data Structures in Perl

2005-07-17 Thread Wiggins d'Anconia
Wijaya Edward wrote: can anybody help me with a link or a tutorial for understanding the Datastructures in perl. Example, Array of Array, Hash of Array, Hash of Hash, Array of Hash. You can find everything you need in: perldoc perldsc -- Regards, Edward WIJAYA SINGAPORE There

Re: Module to merge arbitrary multi-level data structures?

2004-08-03 Thread Randy W. Sims
Randy W. Sims wrote: Does anyone know of a module that can take a reference to two arbitrarily organized data structures, and return a merged structure? Scratch that. Hash::Merge seems to do what I want. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Module to merge arbitrary multi-level data structures?

2004-08-03 Thread Randy W. Sims
Does anyone know of a module that can take a reference to two arbitrarily organized data structures, and return a merged structure? Thanks, Randy. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first

RE: [PBML] Help with Data Structures

2004-06-18 Thread Charles K. Clarkson
From: William Martell mailto:[EMAIL PROTECTED] wrote: : Hello All, : : I was wondering if someone could tell me how to manipulate : this data structure. I have attached the datafile. My code : and code results are printed below. : : If you take a look at the results, you will see that there

Help with Data Structures

2004-06-17 Thread William Martell
Hello All, I was wondering if someone could tell me how to manipulate this data structure. I have attached the datafile. My code and code results are printed below. If you take a look at the results, you will see that there is a hash created for each interaction in the loop and the results

Help with Data Structures

2004-06-14 Thread William Martell
Hello All, I hope you all are doing well. I am trying to get this code to work correctly and I have used another Perl Guru's code [Thanks Charles Clarkson] to get this far, but I am still unsure about a few things... I am trying to read a file (attached). and I am trying to make a csv file

Help with Data Structures

2004-06-04 Thread William Martell
Hello Group,   I am trying to get this code to run. I got it from the book Data Munging with Perl. I cut and pasted the code, then changed the input from stdin to FILE. I supplied a text file for the passwords (I am on a Windows 2k box). But I can't get it correct. I think the line @[EMAIL

RE: Help with Data Structures

2004-06-04 Thread Charles K. Clarkson
From: William Martell mailto:[EMAIL PROTECTED] wrote: : Hello Group, : : : : I am trying to get this code to run. I got it from the book : Data Munging with Perl. I cut and pasted the code, then : changed the input from stdin to FILE. I supplied a text file : for the passwords (I am on a

RE: Help with Data Structures

2004-06-04 Thread William Martell
@names, $surname, $forename; } print map { $_\n } sort @names;Example: reading /etc/passwd Let’s start by writing a routine to read the data into internal data structures. This routine can then be used by any of the following examples. As always, for flexibility, we’ll assume that the data is coming

RE: Help with Data Structures

2004-06-04 Thread Charles K. Clarkson
From: William Martell mailto:[EMAIL PROTECTED] wrote: : Here you go. Try this then: my $users = read_passwd(); my @names; foreach (keys %{$users}) { next unless $users-{$_}{fullname}; my ($forename, $surname) = split(/\s+/, $users-{$_}{fullname}, 2); push @names, $surname,

Re: Help with Data Structures

2004-06-04 Thread John W. Krahn
William Martell wrote: Hello Group, Hello, I am trying to get this code to run. I got it from the book Data Munging with Perl. I cut and pasted the code, then changed the input from stdin to FILE. I supplied a text file for the passwords (I am on a Windows 2k box). But I can't get it

Your recommendations to tie multi-level data structures

2004-03-29 Thread Phil Schaechter
All, I would like the ability to tie a database and use it as a multi-level data structure, like $tied{hash}{subhash} $tied{hash}{array}[0] Etc... Any recommendations for this? I've heard I should check out the MLDBM module. How have others conquered this issue? Is it possible? Thanks,

RE: Your recommendations to tie multi-level data structures

2004-03-29 Thread Bob Showalter
Phil Schaechter wrote: All, I would like the ability to tie a database and use it as a multi-level data structure, like $tied{hash}{subhash} $tied{hash}{array}[0] Etc... Any recommendations for this? I've heard I should check out the MLDBM module. How have others conquered this

RE: copying complex data structures

2003-12-12 Thread West, William M
use Storable; $arrayref_one = dclone( $arrayref_two ); aha thanks :) it's those details that make a program so much easier to make.. i noticed another poster asking about reference notations- i think that this and Object Oriented programming have given me the most headaches on a

copying complex data structures

2003-12-11 Thread West, William M
] = $arrayref_two-[$a]-[$b]; } } it would be nice to have something to copy complex data structures that isn't going to be a code maintenance headache- the above is dependent on the data structure being a 2 dimensional array of particular size. i don't want that restriction. any help would be apreciated

Re: copying complex data structures

2003-12-11 Thread James Edward Gray II
){ $arrayref_one-[$a]-[$b] = $arrayref_two-[$a]-[$b]; } } it would be nice to have something to copy complex data structures that isn't going to be a code maintenance headache- the above is dependent on the data structure being a 2 dimensional array of particular size. i don't

RE: copying complex data structures

2003-12-11 Thread NYIMI Jose (BMB)
Try clone method of Storable module from CPAN. There is also Clone module out there. HTH, José. -Original Message- From: West, William M [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2003 4:37 PM To: [EMAIL PROTECTED] Subject: copying complex data structures the following

Creating uniqueness in complex data structures

2003-11-24 Thread Paul Harwood
The log files I am parsing have threads (a T followed by several alphanumeric numbers) associated with each line of text. I want to push each value of $2 (which is a server name) into an anonymous array. This works fine in the following code. if ($_ =~ /(T[0-9A-F]+) MSM SCTS\((.+)\)/)

Re: Creating uniqueness in complex data structures

2003-11-24 Thread James Edward Gray II
On Nov 23, 2003, at 6:36 PM, Paul Harwood wrote: The log files I am parsing have threads (a T followed by several alphanumeric numbers) associated with each line of text. I want to push each value of $2 (which is a server name) into an anonymous array. This works fine in the following code. if

RE: Creating uniqueness in complex data structures

2003-11-24 Thread Paul Harwood
Conversation: Creating uniqueness in complex data structures Subject: Re: Creating uniqueness in complex data structures On Nov 23, 2003, at 6:36 PM, Paul Harwood wrote: The log files I am parsing have threads (a T followed by several alphanumeric numbers) associated with each line of text. I want

RE: Creating uniqueness in complex data structures

2003-11-24 Thread Jeff 'japhy' Pinyan
On Nov 24, Paul Harwood said: The problem is that the value in $thread can be duplicated therefore it will write over anything else contained there. That's the problem I am having. -Original Message- if ($_ =~ /(T[0-9A-F]+) MSM SCTS\((.+)\)/) {

RE: Creating uniqueness in complex data structures

2003-11-24 Thread Paul Harwood
OK, maybe I am confusing myself. :) -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003 9:27 AM To: Paul Harwood Cc: James Edward Gray II; Beginner Perl Subject: RE: Creating uniqueness in complex data structures On Nov 24, Paul Harwood

RE: Data Structures in Perl

2003-07-08 Thread Trevor Morrison
:3280 Order Number:3280 C:\maverick -Original Message- From: Gupta, Sharad [mailto:[EMAIL PROTECTED] Sent: Sunday, July 06, 2003 4:55 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Data Structures in Perl From ur example i assume that: my @order is an array collecting all

how to create/use data structures in perl ?

2003-07-08 Thread Madhu Reddy
Hi, How to create data structures in perl ? I have following data structure in C...and i have to create similar data structure in perl and use... how to create data strutures in perl and how to use ? typedef struct { charPrefix[8]; charPrint

Re: how to create/use data structures in perl ?

2003-07-08 Thread Sudarshan Raghavan
Madhu Reddy wrote: Hi, How to create data structures in perl ? I have following data structure in C...and i have to create similar data structure in perl and use... how to create data strutures in perl and how to use ? perldoc -f pack perldoc -f unpack typedef struct { char

Data Structures in Perl

2003-07-06 Thread Trevor Morrison
Hi, I am new to using data structures in Perl, but have played with them in C (a long time ago). I have downloaded the Class::Struct::Fields module on my W2K system and all works well. I am finding the documentation a little terse though. I am trying to read into my Perl program orders

RE: Data Structures in Perl

2003-07-06 Thread Gupta, Sharad
:[EMAIL PROTECTED] Sent: Sunday, July 06, 2003 10:37 AM To: [EMAIL PROTECTED] Subject: Data Structures in Perl Hi, I am new to using data structures in Perl, but have played with them in C (a long time ago). I have downloaded the Class::Struct::Fields module on my W2K system and all works well. I

Re: Data Structures in Perl

2003-07-06 Thread Robin Norwood
Gupta, Sharad [EMAIL PROTECTED] writes: From ur example i assume that: my @order is an array collecting all of the objects with each order. So, instead of my @order = new miva_order; we mean to say: my @orders; my $obj = new miva_order;

RE: data structures one more try

2003-03-05 Thread David Gilden
Rob, Good call! You can print out the data in @bags and @bag_quantity using Data::Dumper.. print Dumper [EMAIL PROTECTED]; http://www.coraconnection.com/paul_s/pages/catalog.html Check this out, 'order' second and third bag in the first row. and hit the CGI and see the results,

RE: data structures one more try

2003-03-05 Thread David Gilden
Rob and all the rest reading this, Here's what fixed the problem. The check boxes are only sent to CGI.pm if checked, while all the input fields are sent regardless. So @bag_quantity was filled with '0's ... get rid of 'o's @bag_quantity = grep(/[^0]/, @bag_quantity); ...this now seems

data structures

2003-03-04 Thread David Gilden
I am trying to build a data structure, and am tripping up here. any suggestions? Thx! Dave !/usr/bin/perl -w snip... @bags = param('handbag'); get all of the bags styles @bag_quantity = param('quantity'); get all of the bags quantity foreach my $bag (@bags){ ($bag_name,$imgName) =

RE: data structures

2003-03-04 Thread Hanson, Rob
PROTECTED] Subject: data structures I am trying to build a data structure, and am tripping up here. any suggestions? Thx! Dave !/usr/bin/perl -w snip... @bags = param('handbag'); get all of the bags styles @bag_quantity = param('quantity'); get all of the bags quantity foreach my

RE: data structures / CGI.pm

2003-03-04 Thread David Gilden
Good afternon, I am not seeing consistent results from my script below. It seems that sometimes it works and other times I get '0's in the quantity field. As I don't write PERL often enough this is probably poorly written code! Thanks for any help. Dave HTML at:

Re: STILL NEEW SOME HELP: Using data structures to find similarities and differences

2003-03-04 Thread R. Joseph Newton
WILL BE APPRECIATED. Cheers, aim. Hi Aimal, Can you post any of what you have tried to do to sort out the issues here. Choosing appropriate data structures actually comes in a later part of the process, after you have decided what you want to do with the information in general terms. If you wish

RE: STILL NEEW SOME HELP: Using data structures to find similarities and differences

2003-03-03 Thread Aimal Pashtoonmal
Hello, I have three files, for two different cites. The first file contains names of men with their faves, in columns. The second file is the same but for their partner. The third file is a list of similar partners (partner selection based on data fed into a perl script): FILE_1 and FILE_2

RE: Storing complex Data structures ?

2002-09-11 Thread NYIMI Jose (BMB)
You can also store your complexe data structures in a xml file by using XML::Simple module. http://search.cpan.org/author/GRANTM/XML-Simple-1.08/Simple.pm José. -Original Message- From: Rowan Reid [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 8:39 PM To: 'Perl

Storing complex Data structures ?

2002-09-10 Thread Rowan Reid
What is the correct way to access and store complex data structures to a file. I.e. hashes with several references. The method I have been using is as follows tie (%COMPANY_DB,'MLDBM','studio3.db',O_RDWR|O_CREAT,0777,$DB_BTREE) || die $!; Also DB_File. I'm realizing from previous help

Re: Storing complex Data structures ?

2002-09-10 Thread Paul Johnson
On Tue, Sep 10, 2002 at 11:17:33AM -0700, Rowan Reid wrote: What is the correct way to access and store complex data structures to a file. I.e. hashes with several references. This is Perl. There is no correct way. But you could take a look at Data::Dumper and Storable for other solutions

RE: Storing complex Data structures ?

2002-09-10 Thread Bob Showalter
-Original Message- From: Rowan Reid [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 2:18 PM To: 'Perl beginners' Subject: Storing complex Data structures ? What is the correct way to access and store complex data structures to a file. I.e. hashes with several

RE: Storing complex Data structures ?

2002-09-10 Thread Rowan Reid
No. You access the data through %COMPANY_DB. That's the whole point of tie(). The object $db is used only if you need to call additional methods of MLDBM on it. You really don't even need to save $db, because you can always get it via: tied(%COMPANY_DB) This is what I did

RE: undef of nested data structures

2002-08-15 Thread Bob Showalter
-Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:44 PM To: Beginners (E-mail) Subject: undef of nested data structures I am wondering how undef works. perldoc -f undef I know that undef will undefine a variable if used

Re: undef of nested data structures

2002-08-15 Thread Jenda Krynicky
From: Nikola Janceski [EMAIL PROTECTED] I am wondering how undef works. I know that undef will undefine a variable if used like undef($scalar); I also know that it doesn't actually free up the memory but tells Perl that it's now available to be recycled for other data. but what about

Re: undef of nested data structures

2002-08-15 Thread Kevin Meltzer
:23PM -0400, Bob Showalter ([EMAIL PROTECTED]) said something similar to: -Original Message- From: Nikola Janceski [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 12:44 PM To: Beginners (E-mail) Subject: undef of nested data structures I am wondering how undef works

newbie: data structures

2002-07-24 Thread Anthony E.
How would I store (and access) a table of information...assuming there is a unique key 'email'...ie - These are the column names: email firstName lastName phone address1 [EMAIL PROTECTED] Joe Blow 415-555- 123 Mayberry [EMAIL PROTECTED] John Doe 619-555-5551 456 Happy Ln. etc...etc...

Re: newbie: data structures

2002-07-24 Thread Wiggins d'Anconia
This is a very broad question, so giving a specific answer is difficult to say the least, but since no one else has responded I will provide at least this much You are going to want to be looking at using a hash of hashes essentially you create a hash where each key is the email address

Re: newbie: data structures

2002-07-24 Thread Vikrama Dhiman
ur mail title says data structure but ur problem doe not seem to be of the nature. please be a little more clear. store and retreive, there are as many options as u want. what do u exactly r lookign for??? regards vicki On Wed, 24 Jul 2002 Anthony E. wrote : How would I store (and access) a

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
push (@myVar, @$_) for @$stats; push (@myVar, @$_) for @$totals; push (@myVar, $_) for @$loads; -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: combining data structures into one array I have

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
: Shishir K. Singh Sent: Tuesday, June 18, 2002 10:55 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array push (@myVar, @$_) for @$stats; push (@myVar, @$_) for @$totals; push (@myVar, $_) for @$loads; -Original Message- From: Kipp, James

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
this won't work, will just push one array onto another. thanks -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:55 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array push (@myVar

RE: combining data structures into one array

2002-06-18 Thread Bob Showalter
-Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 10:32 AM To: [EMAIL PROTECTED] Subject: combining data structures into one array I have a subroutine that returns 3 array refs. so i have: my ($stats, $totals, $loads) = gets_stats

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
] thanks Cheers Shihir -Original Message- From: Shishir K. Singh Sent: Tuesday, June 18, 2002 10:55 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array push (@myVar, @$_) for @$stats; push (@myVar, @$_) for @$totals; push (@myVar

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
Do you mean to say push (@$stats, @$totals, $loads); didn't work ?? -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:23 AM To: Shishir K. Singh; Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array I am

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
push (@$stats, @$totals, $loads); didn't work ?? haven't tried yet. get back to you in a bit thanks again -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
Is there a correspondence between stats and totals, such that the nth entry in stats matches the nth entry in totals? If so, you would want to say something like: push @{$stats-[$_]}, @{$totals-[$_]}, @$loads for 0 .. $#$stats; no, there is not. i just want to combine the

RE: combining data structures into one array

2002-06-18 Thread Bob Showalter
-Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:46 AM To: [EMAIL PROTECTED] Subject: RE: combining data structures into one array Is there a correspondence between stats and totals, such that the nth entry in stats matches

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
], [ksh, 1.8, 1.2, 3.7, 3.9 ], etc... ); thanks. -Original Message- From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 18, 2002 11:04 AM To: Kipp, James; [EMAIL PROTECTED] Subject: RE: combining data structures into one array Oops

Re: combining data structures into one array

2002-06-18 Thread Shawn
Hello Jim, how about something along these lines: for(0..$#{$stats}) { push @stats, $stats-[$_],$totals-[$_]; } Shawn - Original Message - From: Kipp, James [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 18, 2002 11:40 AM Subject: RE: combining data structures into one

Re: combining data structures into one array

2002-06-18 Thread drieux
On Tuesday, June 18, 2002, at 07:32 , Kipp, James wrote: I have a subroutine that returns 3 array refs. so i have: my ($stats, $totals, $loads) = gets_stats(); would it be possible to expose this gets_stats() function - and/or re-think how it deals with generating data... ciao drieux

RE: combining data structures into one array

2002-06-18 Thread Shishir K. Singh
: Tuesday, June 18, 2002 12:40 PM To: [EMAIL PROTECTED] Subject: RE: combining data structures into one array Shishir and Bob, still can't get it to work. also decided we can leave out $loads, so basically i want to combine $stats and $totals. as bob suggested, here is sample data: ($stats, $totals

RE: combining data structures into one array

2002-06-18 Thread Kipp, James
I have a subroutine that returns 3 array refs. so i have: my ($stats, $totals, $loads) = gets_stats(); would it be possible to expose this gets_stats() function - and/or re-think how it deals with generating data... of course, that is what i am doing now :-). -- To unsubscribe,

  1   2   >