If you are using ActiveState Perl, you can create a "drop target" using the following steps:

  1. write your script and save it (for this example, I used the following code:
      #!perl -w use strict; open(OUT, ">>drop.txt") or die "Could not open drop.txt"; my $time = scalar localtime; print OUT $time,"\t"; print OUT @ARGV,"\n"; close (OUT);
    and named it drop.pl
  2. change to the directory where your script is located and use the pl2bat.bat script to "convert" your script to a .bat file. i.e. cmd> pl2bat.bat drop.pl
  3. on the desktop right click and choose new->shortcut and create a shortcut to your .bat file.

now you can drop files on the new shortcut (.bat file) icon and it will use the full path as an argument. I tested this on my win2k box, and when I cat the drop.txt file, I get the time and the name of the full path as expected. YMMV.

--
hiseldl
"Act better than you feel" --inner prophet


In reply to Re: Drag and drop to a perl source file. by hiseldl
in thread Drag and drop to a perl source file. by thunders

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.