in reply to Dynamic population of a hash
As others have said you've not supplied enough information, but this may get you started:
use strict; use warnings; use Data::Dumper; my @strs = ( '/Workstation_X_X/<someotherpath>/filename.xxx', '/Workstation_X_X/<someotherpath>/filename.xxx', '/Workstation_X_X/<someotherpath>/filename.yyy' ); my %unique; @unique {@strs} = (); print Dumper (\%unique);
Prints:
$VAR1 = { '/Workstation_X_X/<someotherpath>/filename.xxx' => undef, '/Workstation_X_X/<someotherpath>/filename.yyy' => undef };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dynamic population of a hash
by JFarr (Sexton) on Nov 08, 2005 at 22:14 UTC | |
by friedo (Prior) on Nov 08, 2005 at 22:19 UTC | |
by GrandFather (Saint) on Nov 08, 2005 at 22:20 UTC | |
by Roy Johnson (Monsignor) on Nov 08, 2005 at 22:45 UTC | |
by Anonymous Monk on Nov 09, 2005 at 15:12 UTC | |
by Roy Johnson (Monsignor) on Nov 09, 2005 at 15:41 UTC |