perl -w example.pl

Discussion in 'Perl Misc' started by Steve Rathkopf, Sep 5, 2003.

  1. I have 'successfully' downloaded ActiveState's Perl 5.8.0 and, per the
    instructions, opened a window and entered the text in the subject line
    above.

    When I press the return key, nothing happens, the cursor just sits at
    the start of the next line.

    The program was to print one line of text, but does nothing.

    The above behaviour is exhibited whether I start an MS-DOS session
    from the PROGRAMS menu, or activate one of the Perl applications in
    the Perl directory.

    I was studying Perl on the Unix machine where I just completed a
    contract, and may simply be confused, because this is NOT Unix. I had
    NO problems, aside from the need to debug, on the Unix machine. Now,
    I can't even print a one liner from the prompt.

    Can someone point me in the correct direction?

    Thanks, in advance,
    Steve Rathkopf
    Steve Rathkopf, Sep 5, 2003
    #1
    1. Advertising

  2. Steve Rathkopf

    John Bokma Guest

    Steve Rathkopf wrote:

    > I have 'successfully' downloaded ActiveState's Perl 5.8.0 and, per the
    > instructions, opened a window and entered the text in the subject line
    > above.
    >
    > When I press the return key, nothing happens, the cursor just sits at
    > the start of the next line.
    >
    > The program was to print one line of text, but does nothing.
    >
    > The above behaviour is exhibited whether I start an MS-DOS session
    > from the PROGRAMS menu, or activate one of the Perl applications in
    > the Perl directory.
    >
    > I was studying Perl on the Unix machine where I just completed a
    > contract, and may simply be confused, because this is NOT Unix. I had
    > NO problems, aside from the need to debug, on the Unix machine. Now,
    > I can't even print a one liner from the prompt.
    >
    > Can someone point me in the correct direction?


    post example.pl

    I have been running activestate for ages and it works great.

    If you want a more GNU like experience check out http://www.cygwin.com/
    It has its own perl version.

    Also, rxvt is great, a real terminal. If you need help with the set up,
    check out my weblog at URI in sig.

    --
    Kind regards, feel free to mail: mail(at)johnbokma.com (or reply)
    virtual home: http://johnbokma.com/ ICQ: 218175426
    John web site hints: http://johnbokma.com/websitedesign/
    John Bokma, Sep 5, 2003
    #2
    1. Advertising

  3. Steve Rathkopf

    Bob Walton Guest

    Steve Rathkopf wrote:

    > I have 'successfully' downloaded ActiveState's Perl 5.8.0 and, per the
    > instructions, opened a window and entered the text in the subject line
    > above.



    Hmmmmm...I assume you also installed Perl? That's just a bit more than
    just downloading it.


    >
    > When I press the return key, nothing happens, the cursor just sits at
    > the start of the next line.
    >
    > The program was to print one line of text, but does nothing.
    >
    > The above behaviour is exhibited whether I start an MS-DOS session
    > from the PROGRAMS menu, or activate one of the Perl applications in
    > the Perl directory.
    >
    > I was studying Perl on the Unix machine where I just completed a
    > contract, and may simply be confused, because this is NOT Unix. I had
    > NO problems, aside from the need to debug, on the Unix machine. Now,
    > I can't even print a one liner from the prompt.

    ....
    > Steve Rathkopf
    >


    Did you change directory (cd) to the directory where example.pl is
    stored (your description did not indicate you took that step)? On my
    system that is c:\perl\eg . What do you get if you type:

    perl -v

    at a command prompt? Also try:

    perl -e "print 'hi there'"

    If those work, then it would appear that Perl is working.

    I can't think of anything which would cause the behavior you describe,
    unless you have another program called example.pl other than the one
    that ships with ActiveState Perl. It is certainly possible to write a
    Perl program that does what you describe. For example:

    <>

    as a Perl program would do what you describe.

    --
    Bob Walton
    Bob Walton, Sep 5, 2003
    #3
  4. Steve Rathkopf

    Trent Curry Guest

    "Steve Rathkopf" <> wrote in message
    news:...
    > I have 'successfully' downloaded ActiveState's Perl 5.8.0 and, per the
    > instructions, opened a window and entered the text in the subject line
    > above.
    >
    > When I press the return key, nothing happens, the cursor just sits at
    > the start of the next line.
    >
    > The program was to print one line of text, but does nothing.
    >
    > The above behaviour is exhibited whether I start an MS-DOS session
    > from the PROGRAMS menu, or activate one of the Perl applications in
    > the Perl directory.
    >
    > I was studying Perl on the Unix machine where I just completed a
    > contract, and may simply be confused, because this is NOT Unix. I had
    > NO problems, aside from the need to debug, on the Unix machine. Now,
    > I can't even print a one liner from the prompt.
    >
    > Can someone point me in the correct direction?
    >
    > Thanks, in advance,
    > Steve Rathkopf


    Note, in windows, you need to surround the code in ""s, not ''s, as in
    perl -e "print qq{Hello\n};"
    or
    perl -e "print 'Hello';"

    (The former being able to handle escapes like \n.)
    Trent Curry, Sep 5, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,792
  2. Sam Roberts
    Replies:
    15
    Views:
    290
    Sam Roberts
    Feb 7, 2005
  3. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Jan 23, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    297
    PerlFAQ Server
    Jan 23, 2011
  4. PerlFAQ Server
    Replies:
    0
    Views:
    677
    PerlFAQ Server
    Feb 3, 2011
  5. PerlFAQ Server

    FAQ 1.4 What are Perl 4, Perl 5, or Perl 6?

    PerlFAQ Server, Feb 27, 2011, in forum: Perl Misc
    Replies:
    0
    Views:
    291
    PerlFAQ Server
    Feb 27, 2011
Loading...

Share This Page