Perldoc problem was Re: regular expression on military time

2003-07-27 Thread John
On Saturday, July 26, 2003 12:05 AM AEST, Ted S.  wrote:

 On 25 Jul 2003, John McMahon wrote in perl:

 Ted

 When you produced the output of 'set' below how did you get to the
 CLI console (command line interpreter aka DOS prompt)? This console
 was opened in the 'Windows' directory.

 What was different in *HOW* you got to this console *TO HOW* you got
 to the console where you invoked 'perldoc.bat' in your earlier
 message (other than the directory they were opened in)? This console
 was opened in the 'Perl' directory.

 I'm not certain I understand your question?  In all cases, I'm
 opening the console via the same shortcut that I've got in the
 Start menu.  I then use the cd command to change directories if
 need be.  And the console is always opened in the Windows directory.

I'm just trying to get a picture of what you are doing and how you are
doing it to see if I can suggest alternatives that might work. I have
changed the subject as it was getting off topic.

I assume you have installed Perl in the default location 'c:\perl' and
your perl executable directory will be 'c:\perl\bin'. Since you use the
same shortcut all the time and your path variable (as shown previously
by your 'set' output 'PATH=C:\WINDOWS;C:\WINDOWS\COMMAND') does not
include your Perl directory, to run scripts from the CLI console you
would have to run them from the 'c:\perl\bin' directory.

Ahh! I think I see the problem. Your previous postings:

 snip
 C:\Perlperldoc
 Usage: perldoc.bat [-h] [-r] [-i] [-v] [-t] [-u] [-m] [-n program]
[-l] [-
 F] [-X
 ] PageName|ModuleName|ProgramName
perldoc.bat -f PerlFunc
perldoc.bat -q FAQKeywords

 The -h option prints more help.  Also try perldoc perldoc to get
 acquainted with the system.
 /snip

and

snip

C:\Perlperldoc perltoc
Can't spawn command.com: No such file or directory at
C:\PERL\BIN/perldoc.bat
line 383.
Can't spawn command.com: No such file or directory at
C:\PERL\BIN/perldoc.bat
line 383.
Can't spawn command.com: No such file or directory at
C:\PERL\BIN/perldoc.bat
line 383.

/snip

shows you invoking perldoc in the 'c:\Perl' directory. Information
provided so far suggests that this should not work at all, however it
did, just not properly. I think this is probably because you don't have
the perl executable directory (c:\perl\bin) in your path. If you were to
repeat the exercise above in the 'c:\perl\bin' directory, I think it
should work.

If it does work, invoke 'path c:\perl\bin;%path%' at the prompt to
change the path variable for the current console session then 'cd' to
another directory and test again. It should work.

If this is the answer, then you need to put 'c:\perl\bin' in your path,
you probably should anyway.

HTH
John

-- 
Regards
   John McMahon  (mailto:[EMAIL PROTECTED])

Tired of Outlook Express/Outlook's messy quoting?
Check out OE-Quotefix/Outlook-Quotefix via http://flash.to/oblivion



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


@ARGV array is always empty

2003-07-27 Thread Larry Watson



Hi:

On my Windows XP Professional laptop, when running 
perl programs from the command, no command line arguments are placed into 
@ARGV. Whereas, no problem on my Windows XP Home Edition desktop. 
ActiveState support did not know what the problem is. Here are the 
details:

I downloaded ActivePerl-5.8.0.806-MSWin32-x86.msi 
and installed on a Thinkpad T23 with XP Professional(SP1). I have the same 
problem with ActivePerl-5.6.1.635-MSWin32-x86.msi on this machine. Both 
versions work as expected on my eMachines T2082 desktop.


If I run this program, argvProblem.pl - 


#!perl
printf "The number of arguments is 
%d\n",$#ARGV;exit;

on eMachines XP HE - 

c:\solar\tests\argvProblem.pl 1 2 
3
The number of arguments is 2

on T23 XP Pro


c:\solar\tests\argvProblem.pl 1 2 
3
The number of arguments is -1.

If I run


c:\solar\tests\perl argvProblem.pl 1 2 
3
The number of arguments is 2.

and it works fine!!

Any ideas? From doing "perl -v", I see they are both 5.8.0, build 806. 
Compiled C programs can see their arguments on the XP Pro machine. The 
Folder Options File-Type associations seem the same on both machines. The 
registries appear to be the same. Perl used to work fine on the T23 but I 
had a disk failure, restored with the recovery CD, installed SP1, and then the 
problem. It also failed to work before I installed SP1.

Thanks,
Larry Watson





Re: CGI Error

2003-07-27 Thread Alberto Adrian




Hi all,
i got a
CGI Error message
  

... I think that you are mixing it up. Perl
syntax allways ends commands with ';'. 

I am also learning but haven't arrived yet to perl modules. I am only
programing with plain perl. I need to learn the basics first!
print
header ; ##
NOT ',' but ';'
 start_html('mail') ; ## NOT ',' but ';'
...
 h1('Mail') ; ## NOT ',' but ';'
 ...# Do you see |___V___| the starting of
the hash that allows separating with ',' ?
 $sender-MailFile({to = '[EMAIL PROTECTED]', 
 subject = 'Here is the file',
  ## - here it is correct since it is
part of a hash
 msg = "I'm sending you the list you wanted."});
  

Your doubts indicate that you should try to
understant the following subjects using the command line and typing the
following commands:
please, type...

perldoc -q hash # to
read about hashes
perldoc -m CGI # to read of mod
CGI

And I would first try to do the same thing ,
without using any module. Yes, you can do anything in Perl without
using any module at all.
Of course, you write more, but when we are learning, we need to do that
to learn all well. 
For me, a module is like a concept that we know by experience:
"freedom, compassion, etc." - once you have learned them, with only
mentioning them you get the idea. You don't have to pass throught the
same experience, again and again...
Modules are the same: Once you know what they do by having tryied each
by yourself (without using them), you are able to use them correctly.

This is the way of learning Perl like I am doing it so!

Hope it helps.





  

  
  8c
__/~\__
(((\_/)))
 _) (_
  
  
  
  - :) Alberto Adrin Schiano
:) -
-=( [EMAIL PROTECTED]
  )=-
-LINUX Counter # 240133 #-
   
come_get_my_XML-JAVA-Ebook4FREE4yourDailyThoughts
  
  
  

  









Re: @ARGV array is always empty

2003-07-27 Thread Gerry Green



On your laptop with XP Pro:

 From the Folder Options - 
File types dialog:

 Locate and select the entry for 
PL file

 Click the "advanced" button in 
the details for extension .PL pane at the bottom

 Select the "open" action from 
the list, and then click the the "edit" button

 What do you have under 
"Application used to perform this action"?

 My XP Pro has this:

  
"C:\Perl\bin\perl.exe" "%1" %*

 

 

  - Original Message - 
  From: 
  Larry Watson 
  To: [EMAIL PROTECTED] 
  
  Sent: Sunday, July 27, 2003 10:08 
AM
  Subject: @ARGV array is always 
empty
  
  Hi:
  
  On my Windows XP Professional laptop, when 
  running perl programs from the command, no command line arguments are placed 
  into @ARGV. Whereas, no problem on my Windows XP Home Edition 
  desktop. ActiveState support did not know what the problem is. 
  Here are the details:
  
  I downloaded ActivePerl-5.8.0.806-MSWin32-x86.msi 
  and installed on a Thinkpad T23 with XP Professional(SP1). I have the 
  same problem with ActivePerl-5.6.1.635-MSWin32-x86.msi on this machine. 
  Both versions work as expected on my eMachines T2082 desktop.
  
  
  If I run this program, argvProblem.pl - 
  
  
  #!perl
  printf "The number of arguments is 
  %d\n",$#ARGV;exit;
  
  on eMachines XP HE - 
  
  c:\solar\tests\argvProblem.pl 1 2 
  3
  The number of arguments is 2
  
  on T23 XP Pro
  
  
  c:\solar\tests\argvProblem.pl 1 2 
  3
  The number of arguments is -1.
  
  If I run
  
  
  c:\solar\tests\perl argvProblem.pl 1 2 
  3
  The number of arguments is 2.
  
  and it works fine!!
  
  Any ideas? From doing "perl -v", I see they are both 5.8.0, build 806. 
  Compiled C programs can see their arguments on the XP Pro machine. The 
  Folder Options File-Type associations seem the same on both machines. 
  The registries appear to be the same. Perl used to work fine on the T23 
  but I had a disk failure, restored with the recovery CD, installed SP1, and 
  then the problem. It also failed to work before I installed 
  SP1.
  
  Thanks,
  Larry Watson
  
  
  


Re: Perldoc problem was Re: regular expression on military time

2003-07-27 Thread Gerry Green
Just a quick note:

- Original Message - 
From: John [EMAIL PROTECTED]
To: Ted S. [EMAIL PROTECTED]
Cc: Perl-Win32-Users [EMAIL PROTECTED]
Sent: Sunday, July 27, 2003 3:07 AM
Subject: Perldoc problem was Re: regular expression on military time

clip
 If it does work, invoke 'path c:\perl\bin;%path%' at the prompt to
 change the path variable for the current console session then 'cd' to
 another directory and test again. It should work.

If I remember right, this %path% syntax from the command prompt doesn't work
under command.com.   To change the path like that you'll need to repeat the
current value and include the new entry on the end:

path c:\windows;c:\windows\command;c:\perl\bin



 If this is the answer, then you need to put 'c:\perl\bin' in your path,
 you probably should anyway.

 HTH
 John

 -- 
 Regards
John McMahon  (mailto:[EMAIL PROTECTED])

 Tired of Outlook Express/Outlook's messy quoting?
 Check out OE-Quotefix/Outlook-Quotefix via http://flash.to/oblivion



 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: @ARGV array is always empty

2003-07-27 Thread Gibb, Thomas A



Larry 
wrote.
Hi:

On my Windows XP Professional laptop, when running 
perl programs from the command, no command line arguments are placed into 
@ARGV. Whereas, no problem on my Windows XP Home Edition desktop. 
ActiveState support did not know what the problem is. Here are the 
details:

I downloaded ActivePerl-5.8.0.806-MSWin32-x86.msi 
and installed on a Thinkpad T23 with XP Professional(SP1). I have the same 
problem with ActivePerl-5.6.1.635-MSWin32-x86.msi on this machine. Both 
versions work as expected on my eMachines T2082 desktop.


If I run this program, argvProblem.pl - 


#!perl
printf "The number of arguments is 
%d\n",$#ARGV;exit;

on eMachines XP HE - 

c:\solar\tests\argvProblem.pl 1 2 
3
The number of arguments is 2

on T23 XP Pro


c:\solar\tests\argvProblem.pl 1 2 
3
The number of arguments is -1.

If I run


c:\solar\tests\perl argvProblem.pl 1 2 
3
The number of arguments is 2.

and it works fine!!

Any ideas? From doing "perl -v", I see they are both 5.8.0, build 806. 
Compiled C programs can see their arguments on the XP Pro machine. The 
Folder Options File-Type associations seem the same on both machines. The 
registries appear to be the same. Perl used to work fine on the T23 but I 
had a disk failure, restored with the recovery CD, installed SP1, and then the 
problem. It also failed to work before I installed SP1.[tag]

Check in the registry for the following 
key:

HKEY_CLASSES_ROOT\Perl\shell\Open\command

should have this value "C:\Perl\bin\perl.exe" "%1" 
%*

I think you will find yours if missing the trailing 
'%*' value

HTS

Tom 
Gibb


Re: @ARGV array is always empty

2003-07-27 Thread Larry Watson



Hello Tom:

You suggested check:


HKEY_CLASSES_ROOT\Perl\shell\Open\command
should have this value "C:\Perl\bin\perl.exe" "%1" 
%*
I think you will find yours if missing the trailing 
'%*' value

I have
"C:\Perl\bin\perl.exe" "%1" %*
in that key.

I'm sorry that apparently wasn't the 
problem,
Thanks,
Larry Watson



  - Original Message - 
  From: 
  Gibb, 
  Thomas A 
  To: Larry Watson ; [EMAIL PROTECTED] 
  
  Sent: Sunday, July 27, 2003 8:36 AM
  Subject: RE: @ARGV array is always 
  empty
  
  Larry wrote.
  Hi:
  
  On my Windows XP Professional laptop, when 
  running perl programs from the command, no command line arguments are placed 
  into @ARGV. Whereas, no problem on my Windows XP Home Edition 
  desktop. ActiveState support did not know what the problem is. 
  Here are the details:
  
  I downloaded ActivePerl-5.8.0.806-MSWin32-x86.msi 
  and installed on a Thinkpad T23 with XP Professional(SP1). I have the 
  same problem with ActivePerl-5.6.1.635-MSWin32-x86.msi on this machine. 
  Both versions work as expected on my eMachines T2082 desktop.
  
  
  If I run this program, argvProblem.pl - 
  
  
  #!perl
  printf "The number of arguments is 
  %d\n",$#ARGV;exit;
  
  on eMachines XP HE - 
  
  c:\solar\tests\argvProblem.pl 1 2 
  3
  The number of arguments is 2
  
  on T23 XP Pro
  
  
  c:\solar\tests\argvProblem.pl 1 2 
  3
  The number of arguments is -1.
  
  If I run
  
  
  c:\solar\tests\perl argvProblem.pl 1 2 
  3
  The number of arguments is 2.
  
  and it works fine!!
  
  Any ideas? From doing "perl -v", I see they are both 5.8.0, build 806. 
  Compiled C programs can see their arguments on the XP Pro machine. The 
  Folder Options File-Type associations seem the same on both machines. 
  The registries appear to be the same. Perl used to work fine on the T23 
  but I had a disk failure, restored with the recovery CD, installed SP1, and 
  then the problem. It also failed to work before I installed 
  SP1.[tag]
  
  Check in the registry for the following 
  key:
  
  HKEY_CLASSES_ROOT\Perl\shell\Open\command
  
  should have this value "C:\Perl\bin\perl.exe" "%1" 
  %*
  
  I think you will find yours if missing the trailing 
  '%*' value
  
  HTS
  
  Tom 
  Gibb


Substitute for alarm or select(RBITS,WBITS,EBITS,TIMEOUT)

2003-07-27 Thread Howard Siegel
I need to wait a fixed time for user response, or to proceed if
there is no response within that time.

In Unix, alarm or the four-argument form of select can be used.
In WinNT, using ActivePerl 5.8.0, neither alarm nor select work as
prescribed.

Does anyone have ideas for how I can do what I need myself?

Howard Siegel
[EMAIL PROTECTED]
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: CGI Error

2003-07-27 Thread Randy Kobes
On Sun, 27 Jul 2003, Alberto Adrian wrote:

  i got a CGI Error message

 ...  I think that you are mixing it up. Perl syntax allways ends
 commands with ';'.

 I am also learning but haven't arrived yet to perl modules. I am only
 programing with plain perl. I need to learn the basics first!

  print header ; ## NOT ',' but ';'
 start_html('mail') ; ## NOT ',' but ';'
  ...
 h1('Mail') ; ## NOT ',' but ';'

You should take a look at 'perldoc -f print'; printing a list,
with items separated by commas, as in
   print going ...,  going ...,  gone!;
works fine.

 ...# Do you see |___V___|  the starting of  the hash that allows
  separating with ',' ?
  $sender-MailFile({to = '[EMAIL PROTECTED]',
   subject = 'Here is the file', ##
  - here it is correct since it is part of a hash
   msg = I'm sending you the list you wanted.});

I'm not sure what you mean here - key/value pairs in a hash
can be separated by ',' or by '='; see 'perldoc perlop'.

 Your doubts indicate that you should try to understant the following
 subjects using the command line and typing the following commands:
 please, type...

 perldoc -q hash # to read about hashes
 perldoc -m CGI# to read of mod CGI

 And I would first try to do the same thing , without using any module.
 Yes, you can do anything in Perl without using any module at all.
[ .. ]
Although this may be a good way to learn, most people have
a finite lifetime - getting CGI functionality correct,
including addressing various security concerns, is not
trivial. Most people would advise getting to know CGI.pm,
as this has been tested extensively.

-- 
best regards,
randy kobes
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perldoc problem was Re: regular expression on military time

2003-07-27 Thread Ted S.
On 27 Jul 2003, Gerry Green wrote in perl:

 Just a quick note:
 
 - Original Message - 
 From: John [EMAIL PROTECTED]
 To: Ted S. [EMAIL PROTECTED]
 Cc: Perl-Win32-Users [EMAIL PROTECTED]
 Sent: Sunday, July 27, 2003 3:07 AM
 Subject: Perldoc problem was Re: regular expression on military time
 
clip
 If it does work, invoke 'path c:\perl\bin;%path%' at the prompt to
 change the path variable for the current console session then 'cd' to
 another directory and test again. It should work. 
 
 If I remember right, this %path% syntax from the command prompt
 doesn't work under command.com.   To change the path like that you'll
 need to repeat the current value and include the new entry on the end:
 
 path c:\windows;c:\windows\command;c:\perl\bin

This doesn't stick when I exit the DOS console.

No, I don't know how to change environment variables or other such fun 
stuff.  And heaven knows the help files/documentation are even more 
meager than what comes with most Perl modules!

-- 
Ted Schuerzinger
Homer Simpson: I'm sorry Marge, but sometimes I think we're the worst 
family in town.
Marge: Maybe we should move to a larger community.
http://www.snpp.com/episodes/7G04.html
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perldoc problem was Re: regular expression on military time

2003-07-27 Thread John
On Monday, July 28, 2003 1:32 AM AEST, Gerry Green  wrote:

 Just a quick note:

 - Original Message -
 From: John [EMAIL PROTECTED]
 To: Ted S. [EMAIL PROTECTED]
 Cc: Perl-Win32-Users [EMAIL PROTECTED]
 Sent: Sunday, July 27, 2003 3:07 AM
 Subject: Perldoc problem was Re: regular expression on military time

 clip
 If it does work, invoke 'path c:\perl\bin;%path%' at the prompt to
 change the path variable for the current console session then 'cd' to
 another directory and test again. It should work.

 If I remember right, this %path% syntax from the command prompt
 doesn't work under command.com.   To change the path like that you'll
 need to repeat the current value and include the new entry on the end:

 path c:\windows;c:\windows\command;c:\perl\bin

I am pretty sure it does, I have done that sort of thing for years (back
to DOS 2.1), it certainly works in batch files, but I am not going to
reboot into W98 just to test it.




 If this is the answer, then you need to put 'c:\perl\bin' in your
 path, you probably should anyway.

 HTH
 John


-- 
Regards
   John McMahon  (mailto:[EMAIL PROTECTED])

Tired of Outlook Express/Outlook's messy quoting?
Check out OE-Quotefix/Outlook-Quotefix via http://flash.to/oblivion



___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs