in reply to Re^2: Questions about about what happens after user input
in thread Questions about about what happens after user input

Justin, what im learning is that... with my windows operating system... i have to use activeperl and that is different from all of the other operating system's interpriters...
  • Comment on Re^3: Questions about about what happens after user input

Replies are listed 'Best First'.
Re^4: Questions about about what happens after user input
by Tanktalus (Canon) on Feb 06, 2005 at 05:36 UTC

    Ok, that was relevant information. I'm inferring that you're just clicking on your .pl file ... which can work, but isn't exactly the best way to test/debug your perl code. (Nor is using wordpad or notepad the best editor for programming in - you may want to check out other editors. Just asking about favourite programming editors may get a lot of --'s thrown about - it's a very religious topic in most programming circles, so it's usually avoided.)

    Hit Start->Run and type "cmd". From there, run your perl script (you may have to cd to the right directory - and you may need to run it as "perl <script.pl>"). When it's done, you'll get your command prompt back, and still be able to see everything the perl code did.

    Other alternatives include putting another "my $junk = <STDIN>;" at the end of your code which will cause the program to pause until you hit enter. But, IMO, programmers should become friendly with the command shell - it's just too useful to avoid.

      Well said, Tanktalus. Another valuable and free editor, and a bit more windows-like, is Crimson Editor.

      holli, /regexed monk/
Re^4: Questions about about what happens after user input
by punkish (Priest) on Feb 06, 2005 at 05:31 UTC
    Rob, I've been following your travails in the chatterbox. You are double-clicking on the icon and it is running as a Windows program. It is closing as soon as it gets the name. Run the program as a commandline program from a command line window (dos window). You will do fine.
      so how exactly do i do that (im 12)

        You click the start menu, and then find the menu entry called "MS-DOS Prompt". Depending on how your installation is configured, you may have to change directory into the directory where your Perl script resides. Then just type "perl scriptname". This is one way, and the way most likely to work in the widest range of Windows environments.

        I too followed your CB queries. Age notwithstanding you should still read perlintro and perlfaq1 through perlfaq9. You can also see some Perl usage info that is operating system dependant in perlrun, and in your case, perlwin32. And if you intend to continue learning Perl, I strongly recommend the book Learning Perl published by O'Reilly & Associates.


        Dave