Hi All,
can i debug perl line by line as i do in c with F8. i run a perl program which contains a print statement, i dont get any errors and it runs smoothly returning my prompt signifying that there were no errors but i dont see any output on the cmd window.
Below is the perl script which i ran
#!perl -w
use strict;
use File::Find;
my %directories;
find( \&filehandler, "D:/" );
for my $filename ( sort keys %directories ) {
my @dirlist = @{$directories{ $filename } };
if ( scalar @dirlist > 1 ) {
print "$filename\n";
for ( @dirlist ) {
print " $_\n";
}
} # if
} # for
sub filehandler {
# Check to make sure that it's a file, not a directory
return unless -f $File::Find::name;
# Just take the filename, and convert to lowercase
my $nameonly = lc $_;
# See if it's a DLL or EXE file
return unless $nameonly =~ m/\.(dll|exe)$/i;
$directories{ $nameonly } = [] unless defined $directories{ $nameonly };
push( @{$directories{ $nameonly } }, $File::Find::dir );
}
I encounter this even with other scripts, can any one tell me why this happens.
Thanks in advance.
can i debug perl line by line as i do in c with F8. i run a perl program which contains a print statement, i dont get any errors and it runs smoothly returning my prompt signifying that there were no errors but i dont see any output on the cmd window.
Below is the perl script which i ran
#!perl -w
use strict;
use File::Find;
my %directories;
find( \&filehandler, "D:/" );
for my $filename ( sort keys %directories ) {
my @dirlist = @{$directories{ $filename } };
if ( scalar @dirlist > 1 ) {
print "$filename\n";
for ( @dirlist ) {
print " $_\n";
}
} # if
} # for
sub filehandler {
# Check to make sure that it's a file, not a directory
return unless -f $File::Find::name;
# Just take the filename, and convert to lowercase
my $nameonly = lc $_;
# See if it's a DLL or EXE file
return unless $nameonly =~ m/\.(dll|exe)$/i;
$directories{ $nameonly } = [] unless defined $directories{ $nameonly };
push( @{$directories{ $nameonly } }, $File::Find::dir );
}
I encounter this even with other scripts, can any one tell me why this happens.
Thanks in advance.