Okay, I'll try to simplify. Win XP only.
When you are using Cmd.exe, the so-called Command Prompt, you are still running in Windows, there is no MS-Dos in Windows XP just a Dos emulator program which runs in a window. This dos emulator looks like Dos, feels like Dos, smells like Dos, uses dos-look-alike commands (and many more), in some cases performs like Dos and is most often called Dos but is a program running in Windows.
Here is a definition of emulate from Dictionary.com:
To imitate the function of (another system), as by modifications to hardware or software that allow the imitating system
(Windows) to accept the same data, execute the same programs, and achieve the same results as the imitated system
(MS-Dos).
The emboldened and underlined words are mine.
In Windows when you click to open a file the file extension (.txt or .jpg or .jpeg or .gif etc...) is checked against a list of Associations to determine what program is associated with that filetype and should be used to open the file. So, if .jpg files are associated with Windows Picture and Fax Viewer that program will be started and the program in turn opens the file. If the program associated with the file-type is not capable of opening the file an error message and options are displayed and the user must select what should happen next.
What you should understand is that when you open a file by entering commands at the Command Prompt or by clicking on it in a Window the same process occurs. File associations can be changed by the user, see
here..If you want to open an image using Perl then I think
you have to code the instructions to open the file within your program. Unfortunately my Perl knowledge level is not good enough for me to advise you how to do this. Perhaps some other member will drop by..
Good luck