in reply to grouping lines of data together for later use
So, if you're not under strict (and warnings), please do!!
Said this, judging from your subject & description, as of the queek peek I gave into it, the obvious, mandatory quick answer would be: hashes. Since I don't seem to see any in your code chances are that it could be the correct one.
Check perldata for more info.
Update(taking into account your {reply,remark}):
The usual recommendation about three arga form of open and lexical FHs apply. Also, always include $! in {error,warning} messages about failed system calls.open PAGE, "$website" or die "Cant open $website: $!"; flock (PAGE, 1) or die "Can't lock website file for reading";
Commented this here.while (my $line = (<PAGE>)) { ($Prop,$colour,$txtcol,$url360,$user,$your_name,$address,$town,$zip_co +de,$country,$email,$telephone_no,$telephone_no2,$theme,$web_address,$ +ppemail,undef,undef,undef) = split "\t", $line; #create array of users and hash of data $onprop{$Prop} = [$Prop,$colour,$txtcol,$url360,$user,$your_name,$ +address,$town,$zip_code,$country,$email,$telephone_no,$telephone_no2, +$theme,$web_address,$ppemail]; push (@dataarray, $user); }
Huh?!? This works, if it does work, by accident, only because probably glob doesn't do anything on those items...while (<@dataarray>) {
How 'boutunless (! $item) {
And it's largely a matter of personal preferences, but how 'boutif ($item) { ...
instead?next unless $item;
And so on...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: grouping lines of data together for later use
by jonnyfolk (Vicar) on Sep 27, 2005 at 12:24 UTC | |
by blazar (Canon) on Sep 27, 2005 at 12:50 UTC |