Gossamer Forum
Home : General : Internet Technologies :

Command Prompt

Quote Reply
Command Prompt
Hi,

I'm trying to run a perl script (for the first time) from the command prompt on Win XP but I can't get the C:\>prompt. I can only get C:\Documents and Settings\my name>

How do I change it to the C:\> prompt?????

Thanks

Simon.
Quote Reply
Re: [jai] Command Prompt In reply to
Hi Simon,

C:\Documents and Settings\my name> will work as long as you type the full path to the perl script. If you still want to get to C:\>, just type in cd \. You will still need to type in the full path to the perl script though.

Regards,
Charlie
Quote Reply
Re: [jai] Command Prompt In reply to
cd\ will get you to root.
cd name_of_dir to change to dir.
dir/w to list dir.

Bob
http://totallyfreeads.com.au
Quote Reply
Re: [jai] Command Prompt In reply to
If you prefer command prompt to start in C:\, then you ought to right-click on the command prompt icon, go to properties and edit the "start in" field.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] Command Prompt In reply to
Thanks everyone for your help. So simple when you know what your doing.

I just installed Apache and ActivePerl 5.6.1 and have been trying to follow the steps here -

http://www.mattjacob.org/server/index.html

But I can't get the "Testing the Perl Installation" part to work on the second page - Installing the Perl Package. I have used all the recommended paths and directory names (e.g Apache is installed in H:\Apache\Apache2\ and Perl is intalled in H:\usr\).

I created the hello.pl file like it says and saved it to my C:\ directory but when I go to the command prompt and type - perl hello.pl at the C:\> prompt and hit enter, I get an error message saying "perl is not recognized as an internal or external command, operable program or batch file".

Any ideas as to what I'm doing wrong?

Thanks.

Simon.
Quote Reply
Re: [jai] Command Prompt In reply to
Check your environment variables to make sure Perl was added to your Path. If it's not there, you can add it manually.

Control Panel > Performance and Maintenance > System > Advanced > Environment Variables

BTW, you might as well go ahead and install Perl 5.8.0 while you're at it.

Philip
------------------
Limecat is not pleased.

Last edited by:

fuzzy logic: Sep 28, 2003, 10:17 PM
Quote Reply
Re: [jai] Command Prompt In reply to
Click Run from your Win menu.
Type sysedit and click ok.
Your AUTOEXEC.BAT should have the entry C:\Perl\bin\;

This is mine :
SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\Perl\bin\;%PATH%

If it hasn't add it and save. Reboot your system.

To run scripts from anywhere on command line:
perl -w yourscriptname.pl
To test:
perl -v

Bob
http://totallyfreeads.com.au

Last edited by:

lanerj: Sep 28, 2003, 10:34 PM
Quote Reply
Re: [fuzzy logic] Command Prompt In reply to
Thanks.

The problem was with the environment variable as you said. I downloaded Perl 5.8.0 and installed it and the variable was set correctly.

One more quick question, how do I get out of (escape) the mysql> prompt?

Thank you.

Simon.
Quote Reply
Re: [jai] Command Prompt In reply to
Type quit.

Hit enter.

- wil
Quote Reply
Re: [Wil] Command Prompt In reply to
I tried quit (enter) and quit; (enter) but it doesn't let me out. Strange!
Quote Reply
Re: [jai] Command Prompt In reply to
Type 'q' or Ctrl+q ?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Command Prompt In reply to
ctrl-c terminates command line applications by default, but this can vary per application because it can be overidden.

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [fuzzy logic] Command Prompt In reply to
I've found that pressing Ctrl+q or 'q' gets me out of 'man pages' in SSH.. just thought it was worth a try Tongue

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!