Probably not that useful to most people, but it helps newbies like me in windows a little bit. It's a module that makes file directories/names that you drag and drop into the command prompt (for reading/writing to) readable by the program.
package FileNamePrep; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 0.1; @ISA = qw(Exporter); @EXPORT = (); @EXPORT_OK = qw(promptfilename); %EXPORT_TAGS = ( DEFAULT => [qw(promptfilename)], Both => [qw(promptfilename)]); sub promptfilename { my $file; while(! $file){ $file=<>; chomp($file); $file =~s/^"(.+)"$/$1/; } return $file; } 1;

Replies are listed 'Best First'.
Re: File call in windows.
by liverpole (Monsignor) on Mar 09, 2006 at 22:55 UTC
    That's an interesting idea -- certainly a unique approach to one of the hassles of programming under Windows.

    A couple of years ago I accidentally discovered the trick of dragging an icon (folder or file) onto a command window.  Ever since then, whenever I want to change directory to some visible folder, I go to the command window and type "cd ", and then drag the folder onto the command shell, and type <newline>.  It also works for an open folder, by dragging the miniature folder icon from its upper left corner.  Naturally, it lets you do anything to a file or folder in DOS that you could have done visually.

    Of course, it being Windows, even though you're dragging text onto a command-shell, and thus changing its contents, it still doesn't select the window; you still have to click on the window right after dragging.  I gotta say, the more I use Windows, the more I appreciate Linux ... :)


    @ARGV=split//,"/:L"; map{print substr crypt($_,ord pop),2,3}qw"PerlyouC READPIPE provides"
      I gotta say, the more I use Windows, the more I appreciate Linux ... :)
      I agree nearly completely, but especially the named feature is missing in Gnome, at least I cannot find it.

      And it came to pass that in time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
      (Terry Pratchett, Small Gods)