Re: Fixed Length Text Extract, Write to Excel

From: William Martell (willmartell_at_yahoo.com)
Date: 01/07/04


To: "R. Joseph Newton" <rjnewton@efn.org>,	<beginning_perl@yahoogroups.com>,	<beginners@perl.org>
Date: Wed, 7 Jan 2004 11:46:03 -0600

Thanks for your reply Joseph, I am reading perlref now. If you can offer
some pointers on how to access the key value pairs of the reference object
%item. I would appreciate it.

----- Original Message -----
From: "R. Joseph Newton" <rjnewton@efn.org>
To: "William Martell" <willmartell@yahoo.com>
Cc: <beginning_perl@yahoogroups.com>; <beginners@perl.org>
Sent: Wednesday, January 07, 2004 11:20 AM
Subject: Re: Fixed Length Text Extract, Write to Excel

> William Martell wrote:
>
> > Hello All,
> >
> > I am trying to work with the code I have to extract fields from a text
file report, and write the values into excel.
> >
> > I am having trouble.
> >
> > When I get to push @order_detail, %item
> > I understand that this is pushing an associative array onto a list.
(array
> > of hashes)
>
> That is the problem, a list cannot contain a hash. The keys and values
of the hash simply become flattened into list
> elements, and all the hashing magic is lost.
>
> perldoc perlref
>
> will explain how references can help resolve this problem..
>
> Joseph
>
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe@perl.org
> For additional commands, e-mail: beginners-help@perl.org
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>



Relevant Pages

  • Re: hash two keys to one index
    ... What goes into the map are pairs of (reference to key, ... When I insert an object into the hash table, I pass in ... void insert(Object obj, int hash) throws HashTableFull ... int probe = 0; ...
    (comp.lang.java.programmer)
  • Re: Net::SFTP::Attributes
    ... when I ask a simple question on the correct usage of a module I would ... If $subref is specified, for each entry in the directory, $subref will ... be called and given a reference to a hash with three keys: ...
    (comp.lang.perl.modules)
  • Re: hash two keys to one index
    ... What goes into the map are pairs of (reference to key, ... When I insert an object into the hash table, I pass in ... void insert(Object obj, int hash) throws HashTableFull ... int probe = 0; ...
    (comp.lang.java.programmer)
  • Re: Hashes of Hashes
    ... group = STRING ... If I swap the order of the declarations, then all of the keys for the ... hash that is referenced by $Data. ... This is known as a "symbolic reference" - using the ...
    (perl.beginners)
  • My own handy Pocket Reference notes
    ... inside the covers of my Perl Pocket Reference over the years. ... To pass a only single hash to a subroutine: ...
    (comp.lang.perl.misc)