command line on Windows 98 
Author Message
 command line on Windows 98

I am using Active State perl on Win 98. The following command line does not work.

echo abc | perl -ane 'print($F[0])'

or even

perl -e 'print("hello\n")'

Both of these statements output a blank line.

What is the proper way of using the command line ?

TIA



Fri, 27 Aug 2004 03:46:30 GMT  
 command line on Windows 98

Quote:
> I am using Active State perl on Win 98. The following command line does
not work.

> echo abc | perl -ane 'print($F[0])'

> or even

> perl -e 'print("hello\n")'

> Both of these statements output a blank line.
> What is the proper way of using the command line ?

The DOS shell doesn't recognize the single quotes as command line argument
enclosures. Therefore you must use double quotes (and therefore in turn
escape the inner double quotes around the "hello\n"
Try
    perl -e "print(\"hello\n\");"

But in any case I would recommend to put the Perl code in a file and call
the file.
jue



Sun, 29 Aug 2004 00:39:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Shell commands in Windows 98 SE

2. Installing Perl on Windows 95 or Windows 98

3. Early experiments with forking on Windows 98

4. Help: Get task/process info in Windows 98?

5. How to install Perl (and Apache on a Windows 98 system to test CGI/SQL scripts)

6. Perl on Windows 98

7. Problems with IE 4.01/Windows 98 and cgi

8. Apache perl mod for Windows 98

9. modules for windows 98

10. Looking for a C compiler for Windows 98

11. - Cerco Perl e PerlCgi con manuale in italiano in ambiente windows 98 o 2000 da scaricare

12. Minimalist Perl Interpreter for Windows 98 and XP?

 

 
Powered by phpBB® Forum Software