Loading ...
Sorry, an error occurred while loading the content.
 

Re: [PBML] Question about a hash of arrays of arrays

Expand Messages
  • merlyn@stonehenge.com
    ... Lange my code until now: Lange while ( ) { Lange my ($id, @rec)= split ; ; Lange $refHash- {$id}= [@rec]; Replace that
    Message 1 of 5 , Oct 2, 2003
      >>>>> "Lange" == Lange Gunter, CH <gunter.lange@...> writes:

      Lange> my code until now:

      Lange> while (<INPUT>) {

      Lange> my ($id, @rec)= split ';';

      Lange> $refHash->{$id}= [@rec];

      Replace that with:

      push @{$refhash->{$id}}, [@rec];

      Lange> }

      --
      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
      Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
      See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    • gl_bike2ride
      @Randall, thank you for the hint and for giving us Perl :) @all, for more information look into the Perl Cookbook, Chapter 5 Hashes ; esp. 5.7. Hashes with
      Message 2 of 5 , Oct 2, 2003
        @Randall, thank you for the hint and for giving us Perl :)

        @all, for more information look into the Perl Cookbook, Chapter
        5 "Hashes"; esp. 5.7. "Hashes with Multiple Values Per Key"

        May be you will find the Chapter elsewhere on the web.

        A discussion of the same topic "Hashes with Multiple Values per Key"
        also in this group in messages 8479, 8481, 8482, 8484, 8485.
      • merlyn@stonehenge.com
        ... gl @Randall, thank you for the hint and for giving us Perl :) Please... I gave you *writings* about Perl. Not Perl itself. That s Larry Wall. -- Randal
        Message 3 of 5 , Oct 2, 2003
          >>>>> "gl" == gl bike2ride <gl_bike2ride@...> writes:

          gl> @Randall, thank you for the hint and for giving us Perl :)

          Please... I gave you *writings* about Perl. Not Perl itself. That's
          Larry Wall.

          --
          Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
          <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>
          Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
          See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
        • greg@gadgeteer.net
          ... Ok, but you gave us the Schwartzian Transform, which is godlike :) How goes things, Randal? I chatted with you a while back on Perlmonks and you were most
          Message 4 of 5 , Oct 2, 2003
            On 2 Oct 2003 merlyn@... wrote:
            > Please... I gave you *writings* about Perl. Not Perl itself. That's
            > Larry Wall.

            Ok, but you gave us the Schwartzian Transform, which is godlike :)

            How goes things, Randal? I chatted with you a while back on Perlmonks and
            you were most helpful. I still have confusion about child processes, but
            you helped a lot.

            Greg
          Your message has been successfully submitted and would be delivered to recipients shortly.