perl -w example.pl

S

Steve Rathkopf

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
 
J

John Bokma

Steve said:
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.
 
B

Bob Walton

Steve said:
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.
 
T

Trent Curry

Steve Rathkopf said:
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.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,083
Members
48,773
Latest member
Kaybee

Latest Threads

Top