in reply to Re^3: Duplicates in Win32::DirSize
in thread Duplicates in Win32::DirSize
The outside if else statement works just fine it is just the if and else inside that does not act properly.sub create_file_for_batch{ if($dest ne "" && $source ne "" && $logpath ne "" && length($sourc +etext)!=1){ $sourcetext=$sourcetextentry->get('1.0','end'); $original_dest = $dest; $dest =~s/\//\\/g; $original_source = $source; $source =~s/\//\\/g; $switches=""; save_switches(); print LOG ("The destination path was: $dest\n The source path was: $source\n The path for the log file is: $logpath\n The users are: $sourcetext\n"); @arraybatch = split /,|\n/, $sourcetext;#splits what is in the + variable $len = @arraybatch; for($i=1; $i<$len; $i=$i+2){ $arraybatch[$i] =~s/\G //g;#gets rid of the space in front $arraybatch[$i] =~s/ /_/g;#put _ in place of the space bet +ween the name push @arrayfilename, $arraybatch[$i]; }#for for($i=0; $i<$len; $i=$i+2){ push @arraydirectory, $arraybatch[$i]; }#for @sortedarraydirectory = @arraydirectory;#makes a copy of the a +rraydirectory so I can sort @sortedarraydirectory= sort @sortedarraydirectory;#sort the co +pied array $len = @sortedarraydirectory; for ($i=0; $i<$len; $i++){ if ($sortedarraydirectory[$i] ne $sortedarraydirectory[$i+ +1]){ make_table(); $notebook->pageconfigure('page1', -state=>'normal'); $notebook->pageconfigure('page2', -state=>'normal'); }else{ $dialog = $page3-> Dialog( -title => 'Alert', -text => "$sortedarraydirectory[$i] is a duplicate. Pl +ease correct the batch file.", -buttons => [ qw(OK) ]) ->Show(); }#else }#for }else{ $dialog = $page3-> Dialog( -title => 'Alert', -text => "Please enter paths for destination, sources and log +file and fill out the text area for batching", -buttons => [ qw(OK) ]) ->Show(); }#else }#create_file_for_batch
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Duplicates in Win32::DirSize
by wink (Scribe) on Aug 21, 2005 at 06:17 UTC |