in reply to Re: Subroutine speed
in thread Subroutine speed

the code is as follows , I hope now people can easily test it out and bring the best to me.
#!/usr/bin/perl -w
It's better to
use warnings;
nowadays.
use Strict; use File::Stat; use Digest::MD5; print "Enter the Path where all the data files are available:\t";
Are you sure you want "\t" rather than "\n"?
$sourcedir= <STDIN>; chomp($sourcedir);
Since you're under strict this won't even compile. It is a good thing to post real code.

Update: Case matters! (Hadn't noticed your mistake in the first place.) Please (do a favour to yourself and) reread your program taking this into account.

open(LOG ,">>D:\\prad\\log1.csv");
It's better to I'm not reading the rest of your script. You should consider preparing a minimal, working, test program still exhibiting the problem you're concerned about and submit that. Chances are that in the process of doing so you will find the answer yourself...

Replies are listed 'Best First'.
Re^3: Subroutine speed
by vek (Prior) on Jan 22, 2005 at 05:45 UTC

    Just out of curiosity, why do you consider use warnings; superior to perl -w?

    -- vek --
      perldoc warnings
      perldoc perllexwarn
      perldoc perlrun
      
      Short answer: more flexibility.

        Right, I'm aware of those. My meaning is that you made a statement to the OP but didn't explain *why* you thought use warnings; was better.

        -- vek --