emusic32 has asked for the wisdom of the Perl Monks concerning the following question:
sub load { my ($self,$file); open my $f,"<group.conf"; # opens config files my $last_group=''; while (my $line=<$f>) { chomp $line; next if length $line == 0; if($line =~/^group\d+/) { $last_group = $line; $config->{num_groups}++;#countgroups next; }; push @{ $config->{groups}->{$last_group} },$line; # collects each groups lower and upper bounds (BUT HOW?) }; } group.conf CONTAINS: group1 AG3333 .Y33 1999 HU4555 .T34 2000 group2 HV9069 .L28 2003 KA5333 .A12 2001 group3 KB XX
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PUSH Question
by ikegami (Patriarch) on Aug 13, 2008 at 17:19 UTC | |
by emusic32 (Initiate) on Aug 16, 2008 at 14:40 UTC | |
by FunkyMonk (Bishop) on Aug 16, 2008 at 15:58 UTC | |
by ysth (Canon) on Aug 17, 2008 at 05:54 UTC | |
|
Re: PUSH Question
by toolic (Bishop) on Aug 13, 2008 at 17:26 UTC |