Rodrick Brown wrote:
> On Sun, Jun 8, 2008 at 10:37 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]>
> wrote:
>
>> Rodrick Brown wrote:
>>
>>> #!/usr/bin/perl -w
>>>
>> The -w switch is redundant, since you have "use warnings;".
>>
>> use strict;
>>> use warnings;
>>> use Data::Dumper;
>>> my $file = '
Rodrick Brown wrote:
On Sun, Jun 8, 2008 at 10:37 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]>
wrote:
push @{ $hash->{$homeDir} }, $user;
Yes please explain how exactly that line works? I know @{} dereferences an
array so it looks like your pushing each user into an anonymous array.
Yes, t
On Sun, Jun 8, 2008 at 10:37 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]>
wrote:
> Rodrick Brown wrote:
>
>>
>> #!/usr/bin/perl -w
>>
>
> The -w switch is redundant, since you have "use warnings;".
>
> use strict;
>> use warnings;
>> use Data::Dumper;
>> my $file = '/etc/passwd';
>> my $hash;
>> my
Rodrick Brown wrote:
#!/usr/bin/perl -w
The -w switch is redundant, since you have "use warnings;".
use strict;
use warnings;
use Data::Dumper;
my $file = '/etc/passwd';
my $hash;
my ($user, $homeDir);
my $count=0;
Why did you declare that variable?
open(my $fh, "<", $file) or die("Fatal
I want each Hash element to point to an array or list of users that share
the same home dir instead of another hash.
ie.
$VAR1 = {
'/var/imap' => {
'_cyrus'
},
'/var/empty' => {
'_spotlight'
Rodrick Brown wrote:
I'm trying to fully understand references so I created a data structure to
stores the output of users on my system who share home dirs.
I use a HoH to represent this data set but its not working as expected.
Conceptually I can visualize how the data should look but I cant get
Rodrick Brown wrote:
I'm trying to fully understand references so I created a data structure to
stores the output of users on my system who share home dirs.
I use a HoH to represent this data set but its not working as expected.
Conceptually I can visualize how the data should look but I cant get
Rodrick Brown wrote:
I'm trying to fully understand references so I created a data structure to
stores the output of users on my system who share home dirs.
I use a HoH to represent this data set but its not working as expected.
Conceptually I can visualize how the data should look
Perhaps if y