in reply to Re^2: MD 5 hash comparison/checker
in thread MD 5 hash comparison/checker

but if I just click the .pl file it shuts down at the end.

Ah. That explains a great deal. If you really want/expect the script to work when it gets launched by clicking on the file's icon in a file browser, consider the following idiom:

#!/usr/bin/perl # (use a unix/linux style shebang line, # because someday you will want to use a unix/linux system) use strict; my $reqd_param_count = 2; # (e.g. two file names) if ( ! @ARGV ) { # prompt for interactive input of required parameter(s) ... } elsif ( @ARGV == $reqd_param_count ) { # invoked from an interactive shell: required params are in @ARGV ... } else { die "Usage: $0 arg1 ...\n"; }
But seriously, there ought to be a sensible way to set things up so that a user can easily invoke a perl script with args (that will go into @ARGV). If not, just please switch to some sort of GUI approach (Tk, wx, etc), or else get cozy with using a CLI shell ("bash" is available for windows, and is the best, IMHO).

Replies are listed 'Best First'.
Re^4: MD 5 hash comparison/checker
by daggy (Novice) on May 07, 2010 at 04:12 UTC
    How would I go about implementing that code?