in reply to Entry Integrity
"..to make sure he/she doesn't input the same path twice.."
Whenever you talk about _unique_ _anything_ in Perl, then it usually means that you need a hash.
my %unique_paths = (); while (<DATA>) { chomp; my ($drive, $path) = split /:/; $unique_paths{$path}++; } for (keys %unique_paths) { print "$_\n"; } __DATA__ D:/myfiles/Test/ E:/pics/cgi-bin/new/ C:/temp/ D:/new/files/ F:/new/more/ C:/test/cgi-bin/ac/ C:/new/files/
|
|---|