in reply to Newbie cmd prompt problem

You're typing/click what and you're seeing what?

Try reading the Behind the GUI lives the Shell and see if that clears up anything for you

Treasure trove of shell links

See also

Replies are listed 'Best First'.
Re^2: Newbie cmd prompt problem
by nquiton (Novice) on Sep 11, 2013 at 23:21 UTC
    The command box disappears. I'm running perl on a Windows 7 machine. I drag the file from its location into a cmd prompt window and one of two things happens. 1) It looks as though it may have run the program but the cmd window flashed on the screen and then disappears (no it's not in the task bar) OR 2) cmd window stays on my screen but I have to drag it into the window several times to get it to run. The whole thing seems very buggy. I don't know how else to describe it.

      Perl preaches there's more than one way to do it ... but that's completely the wrong way to do it.

      Go to "Start" -> "Run" and enter 'cmd' (without the quotes) and press the "OK" button

      Get familiar with Command Prompt (DOS) commands like 'cd' to change directory into the directory where your Perl script is. From there, type:

      C:\> perl myscript.pl

      where 'myscript.pl' is the name of your Perl script.

      Alternatively, add the line:

      system "pause";

      as the very last line in your Perl script. That's the "poor man's way" of keeping the Command Prompt open when you double-click a Perl script to run versus running it from the command line.

        I think I figured out the problem. BTW, lol, I was alive in the DOS days. I was even alive in the Apple 2E days. (age give away) So yes, I do know how to get into to and work with the cmd line. But here is what I figured out. Apparently when naming your files you should not use spaces. When I changed the file name and removed my spaces it ran. Now I know for sure I'll never be a programmer because I have LOTS of errors:-) Thank you for your help!

      1) It looks as though it may have run the program but the cmd window flashed on the screen and then disappears (no it's not in the task bar)

      what happens when you type "perl .....file.pl"?

      2) cmd window stays on my screen but I have to drag it into the window several times to get it to run.

      uh oh, "cmd window" and "the window"? that is weird, dragging windows to run a program is not normal operation -- what are you talking about?

        When I typed perl and the file name the first time nothing happened. The second time i did it (right below the first time in the cmd window) it told me my code had errors (no surprise). So... the second time it ran obviously. It is a very weird problem I know. Even the teacher couldn't figure it out. Re: cmd window stays on my screen but I have to drag it into the window several times to get it to run. You must be a Mac user? This is a unique feature on the windows version of Perl. In the windows version you can have the folder open were the .pl file is and the cmd window open and drag the file from the it's location into the cmd window, press enter and have it execute it.