in reply to Pentesting tool

Don't prompt when you can pass arguments :)
#!/usr/bin/perl -- use strict; use warnings; ... Main( @ARGV ); exit( 0 ); sub Main { if( not @_ ){ print "Usage: $0 filenameToOpen\n\n"; } ... }

Read Behind the GUI lives the Shell, perlintro, perlrun, @ARGV