Sponsored Content
Full Discussion: Perl Data Structures
Top Forums Shell Programming and Scripting Perl Data Structures Post 302412615 by dinjo_jo on Tuesday 13th of April 2010 04:21:58 AM
Old 04-13-2010
Perl Data Structures

Here is what i need to do.

Code:
@data #has all column wise data so say info for col 1 location for all rows would be in this array

Code:
$array[index] = \@data

But i need to create a file which should contain these information in a format for all columns even if i have got no values from some of the index say $array[1] could be null.

So the @array would store data in a columnar form which would also include some blank columns.

Example -
Code:
$array[0] = \@data  #@data=(1,2,3)
$array[1] = NULL
$array[2] = \@data1 #@data=(A,B,C)

Need to format the data in this way
Code:
1||A
2||B
3||C

I have the rowcount of records and count of columns need to make it generic

Last edited by dinjo_jo; 04-13-2010 at 05:27 AM..
 

3 More Discussions You Might Find Interesting

1. Programming

Recommendations For Generic C Data Structures & Algorithms

Hi All, Rather than re-invent the wheel, I am trying to find a mature C library that provides generic support for lists, trees, etc. I understand C doesn't formally support "generics", but am aware of a few solutions like GLib and SGLib. Can anyone kindly recommend what they think is best?... (1 Reply)
Discussion started by: tristan12
1 Replies

2. Programming

shared memory - userdefined data structures

Hello, I wonder if I can write my userdefined data structures(ex: a list) to a shared memory segment? I know, the shm functions get (void*) parameter so I should be able to read and write a list into the shared memory. may someone inform and clarify me about that, please? (1 Reply)
Discussion started by: xyzt
1 Replies

3. Programming

Signalsafe data structures

Hello, I have a signal handler which manipulates a data structure. The data structure's operations aren't atomic. So if two threads/processes are in a critical section at the same time the data structure will be broken. With threads you can avoid this stuff with semaphores etc. However,... (10 Replies)
Discussion started by: littlegnome
10 Replies
Graphics::Primitive::Insets(3pm)			User Contributed Perl Documentation			  Graphics::Primitive::Insets(3pm)

NAME
Graphics::Primitive::Insets - Space between things DESCRIPTION
Graphics::Primitive::Insets represents the amount of space that surrounds something. This object can be used to represent either padding or margins (in the CSS sense, one being inside the bounding box, the other being outside) SYNOPSIS
use Graphics::Primitive::Insets; my $insets = Graphics::Primitive::Insets->new({ top => 5, bottom => 5, left => 5, right => 5 }); METHODS
Constructor new Creates a new Graphics::Primitive::Insets. Instance Methods as_array Return these insets as an array in the form of top, right, bottom and left. bottom Set/Get the inset from the bottom. equal_to Determine if these Insets are equal to another. left Set/Get the inset from the left. right Set/Get the inset from the right. top Set/Get the inset from the top. zero Sets all the insets (top, left, bottom, right) to 0. AUTHOR
Cory Watson, "<gphat@cpan.org>" SEE ALSO
perl(1) COPYRIGHT &; LICENSE Copyright 2008-2010 by Cory G Watson. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2010-08-21 Graphics::Primitive::Insets(3pm)
All times are GMT -4. The time now is 01:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy