|
|
sybperl-l Archive
Up Prev Next
From: Marc Gurreri <marcg at ms dot com>
Subject: Re: New to perl need help on arrays.
Date: Apr 17 1998 9:05AM
#!/../../../perl
BEGIN { use lib '~/perl/lib'; # our std lib doesn't have Slurp or
ScalarArray
require Exporter;
use File::Slurp;
use IO::ScalarArray;}
require Exporter;
use vars qw(@ISA);
@ISA = qw(Exporter IO::ScalarArray File::Slurp);
@l = read_file(); ## File::Slurp method
$dh = new IO::ScalarArray \@l; ##
## from here you can treat $dh like a filehandle.
-good luck
Marc
Steve Allen wrote:
> FOlks,
>
> I have a problem to solve, firstly I need to create a dynamic array to
> hold data retrieved from a text file, or db in perl.(sybperl)
>
> its sort of a diary feature, the results are all the entries for peoples
> movements.
> however if do not have an entry for a day between start and finish I
> need to create one.
>
> the results would be user, movement description, and date
>
> then print out the elements afterwards, or manipulate etc.
>
> can anybody help?
> regards
> steve
> --
> Sybase (UK) LTD email: sallen@sybase.com
> Sybase Court direct: 01628 587130
> Crown Lane tel: 01628 597111
> Maidenhead fax: 01628 597112
> Berkshire http: www.sybase.com
> SL6 8QZ
|