Just for the curious, and those google searchers out there, I got things worked out.
(trusty)westmj@localhost:~/GoogleDrive/perl$ cat hello_world.pl #! /usr/bin/perl print "Hello, World!\n\@ARGV:\n"; foreach $arg (@ARGV) { print "$arg\n"; } warn "Press 'Enter' or 'Return' to finish.\n"; <STDIN> (trusty)westmj@localhost:~/GoogleDrive/perl$ perl hello_world.pl 1 2 Hello, World! @ARGV: 1 2 Press 'Enter' or 'Return' to finish. (trusty)westmj@localhost:~/GoogleDrive/perl$ cat hello_world_desktop.d +esktop [Desktop Entry] Version=1.0 Name=Hello_World_desktop Comment=Execute by dropping file onto Exec=/usr/bin/perl /home/westmj/GoogleDrive/perl/hello_world.pl '%F' #Icon=/home/alex/Pictures/icon.png Terminal=true Type=Application #Categories=Application MimeType=application/vnd.ms-excel;application/vnd.openxmlformats-offic +edocument.spreadsheetml.sheet;inode/directory;text/plain;text/x-scrip +t.perl;
Dragging two perl files onto the .desktop file works, the output in a new terminal is:
Hello, World! @ARGV: /home/westmj/GoogleDrive/perl/modify.pl /home/westmj/GoogleDrive/perl/Open_with_NotePad-attenders.pl Press 'Enter' or 'Return' to finish.
In reply to Re: Ubuntu: drag files/folders onto perl script and get their names in @ARGV
by westmj
in thread Ubuntu: drag files/folders onto perl script and get their names in @ARGV
by westmj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |