Re: qx// broken on Win98

2004-02-10 Thread Greg Matheson
On Tue, 10 Feb 2004, Tobias Hoellrich wrote:

> Works fine, once you know what the difference between system and qx is (read
> "perldoc -f system" and "perldoc perlop" [search for `STRING` in the later
> one]). 

> (on Windows XP):
> C:\>cd
> C:\

> C:\>perl -e "print qx{cd};"
> C:\

> Hope this helps

Thanks. Here too,

[EMAIL PROTECTED] ~
$ perl -e "print qx/cd/"
C:\cygwin\home\greg

the right results. Trying that with system

[EMAIL PROTECTED] ~
$ perl -e "print system( 'cd' )"
C:\cygwin\home\greg
0

That's interesting. That first line must be coming out as STDERR
and the O is STDOUT, I think. There is no error in 

[EMAIL PROTECTED] ~
$ perl -e "qx/cd/"

[EMAIL PROTECTED] ~
$ 

so nothing is printed. And

[EMAIL PROTECTED] ~
$  perl -e "qx/cd fdssfdfds/"
ƒfƒBƒŒƒNƒgƒŠ‚ÌŽw’肪ˆá‚¢‚Ü‚·.

[EMAIL PROTECTED] ~
$ 

An error message about mistaken specification of directory.

-- 
Greg Matheson, Taiwan

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


Uploading Files

2004-02-10 Thread Shain Edge
 
 

=
Mekton Compendium: http://groups.yahoo.com/group/mekton-c/
Subscribe: http://groups.yahoo.com/subscribe/mekton-c

Nothing is impossible. the supposidly impossible can be made possible by anyone who 
determines what you need to do to make it a reality. -Shain Edge

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: qx// broken on Win98

2004-02-10 Thread Keith C. Ivey
[EMAIL PROTECTED] wrote:

>   C:\cygwin\home\greg\smoke>perl -e "qx/cd/"
> 
>   C:\cygwin\home\greg\smoke>perl -e "system( q/cd/ )"
>   C:\cygwin\home\greg\smoke
> 
> here it is from a bash shell:
> 
>   [EMAIL PROTECTED] ~/smoke
>   $ perl -e 'qx/pwd/'  
> 
>   [EMAIL PROTECTED] ~/smoke
>   $ perl -e 'system( "pwd" )'
>   /home/greg/smoke

And?  What is it that you think is wrong?  Have you read the 
documentation for qx()?  It's not the same as system() -- it's 
the same as backticks.

It's not impossible for something to be broken in perl, but 
whenever you suspect it is, remember that it's orders of 
magnitude more likely that what's broken is your program or 
your understanding of the situation.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Washington, DC

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


Re: qx// broken on Win98

2004-02-10 Thread Sisyphus
[EMAIL PROTECTED] wrote:
qw// seems to be
broken when perl is built with GNU tools, and dmake on Win98.
Or is it something wrong with my system?
C:\cygwin\home\greg\smoke>cd
C:\cygwin\home\greg\smoke
	C:\cygwin\home\greg\smoke>perl -e "qx/cd/"

C:\cygwin\home\greg\smoke>perl -e "system( q/cd/ )"
C:\cygwin\home\greg\smoke
I get the same behaviour on Win2k, with both AS-built perl and 
Mingw-built perl (cmd.exe shell).

Should it be different ? (Not a rhetorical question . I don't know 
the answer :-)

Cheers,
Rob
--
Any emails containing attachments will be deleted from my ISP's mail 
server before I even get to see them. If you wish to email me an 
attachment, please provide advance warning so that I can make the 
necessary arrangements.

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


RE: qx// broken on Win98

2004-02-10 Thread Tobias Hoellrich
Works fine, once you know what the difference between system and qx is (read
"perldoc -f system" and "perldoc perlop" [search for `STRING` in the later
one]). 

(on FreeBSD):
frisco% pwd
/usr
frisco% perl -v

This is perl, v5.6.1 built for i386-freebsd

Copyright 1987-2001, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

frisco% perl -e 'qx{pwd};'  
frisco% perl -e 'print qx{pwd};'
/usr
frisco% 


(on Windows XP):
C:\>cd
C:\

C:\>perl -v

This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2001, Larry Wall

Binary build 635 provided by ActiveState Corp. http://www.ActiveState.com
Built 15:34:21 Feb  4 2003


Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.


C:\>perl -e "qx{cd};"

C:\>perl -e "print qx{cd};"
C:\


Hope this helps
  Tobias




> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Tuesday, February 10, 2004 8:08 PM
> To: [EMAIL PROTECTED]
> Subject: qx// broken on Win98
> 
> 
> qw// seems to be
> broken when perl is built with GNU tools, and dmake on Win98.
> Or is it something wrong with my system?
> 
>   C:\cygwin\home\greg\smoke>cd
>   C:\cygwin\home\greg\smoke
> 
>   C:\cygwin\home\greg\smoke>perl -e "qx/cd/"
> 
>   C:\cygwin\home\greg\smoke>perl -e "system( q/cd/ )"
>   C:\cygwin\home\greg\smoke
> 
> here it is from a bash shell:
> 
>   [EMAIL PROTECTED] ~/smoke
>   $ perl -e 'qx/pwd/'
> 
>   [EMAIL PROTECTED] ~/smoke
>   $ perl -e 'system( "pwd" )'
>   /home/greg/smoke
> 
> Here is some id:
>   C:\s\home\greg>perl -v
> 
>   This is perl, v5.8.2 built for MSWin32-x86-multi-thread
> 
>   Copyright 1987-2003, Larry Wall
> 
>   Perl may be copied only under the terms of either the
> Artistic License 
> 
> (and also ActiveState's is too)
> 
>   C:\perl\bin>.\perl -v
> 
>   This is perl, v5.8.0 built for MSWin32-x86-multi-thread
>   (with 1 registered patch, see perl -V for more detail)
> 
>   Copyright 1987-2002, Larry Wall
> 
>   Binary build 806 provided by ActiveState Corp.
> http://www.ActiveState.com
>   Built 00:45:44 Mar 31 2003
> 
> ...
> 
>   C:\perl\bin>.\perl -e "qx/cd/"
> 
>   C:\perl\bin>.\perl -e "system( q/cd/ )"
>   C:\perl\bin
> 

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


RE: byte handling query

2004-02-10 Thread Sanjay Godbole
Thanks John,
I tried everything with this. 
Although, I programmatically close the socket, the printer is locked up till
the time; I switch it off and switch it on again. 
I tried to do an undef for all the variables being used. 

But it doesn't seem to be working. What am I missing?


Rgds,

Sanjay Godbole


-Original Message-
From: Jarvis, John [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 10, 2004 3:48 PM
To: 'Sanjay Godbole'
Cc: [EMAIL PROTECTED]
Subject: RE: byte handling query


If you communicate with your printer directly (e.g. Raw Socket on port 9100;
not LPR), the IO::Socket commands should be able to handle it.  If the
commands being sent to the printer cause the print processing to hang, that
may not be a network issue.

I once had to put together a test script to confirm that a PCL/HPGL -capable
printer was handling the page and print commands.  It's not pretty but it
works and was understood by others without too much head scratching.

HTH,
jtj
-Original Message-
From: Sanjay Godbole [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 6:46 AM
To: 'Jarvis, John'
Cc: [EMAIL PROTECTED]
Subject: RE: byte handling query



I am able to send and receive data from the printer properly. 

However, I still have one problem! After executing the program every time, I
have to explicitly turn the printer off and back on. This is because; the
program is not able to successfully close the connection. I am closing the
socket explicitly. I think something else needs to be closed too.

I tried the similar program in Java. There, I am able to close the
connection under one condition. I follow the below steps:
1. Open Socket 
2. Define OutputStream (Enquiry request bytes) & send it 
3. Open InputStream & start reading it. 
4. Close InputStream 
5. Close Socket

I think, I need to close something more, before just closing the socket. I
don't know what. 

Can somebody help me please?

Rgds,

Sanjay Godbole




__
Disclaimer: This e-mail message is intended only for the personal use of 
the recipient(s) named above.  If you are not an intended recipient, you 
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete 
the original message.
This e-mail expresses views only of the sender, which are not to be 
attributed to Rite Aid Corporation and may not be copied or distributed 
without this statement.



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


qx// broken on Win98

2004-02-10 Thread lang
qw// seems to be
broken when perl is built with GNU tools, and dmake on Win98.
Or is it something wrong with my system?

C:\cygwin\home\greg\smoke>cd
C:\cygwin\home\greg\smoke

C:\cygwin\home\greg\smoke>perl -e "qx/cd/"

C:\cygwin\home\greg\smoke>perl -e "system( q/cd/ )"
C:\cygwin\home\greg\smoke

here it is from a bash shell:

[EMAIL PROTECTED] ~/smoke
$ perl -e 'qx/pwd/'  

[EMAIL PROTECTED] ~/smoke
$ perl -e 'system( "pwd" )'
/home/greg/smoke

Here is some id:
C:\s\home\greg>perl -v

This is perl, v5.8.2 built for MSWin32-x86-multi-thread

Copyright 1987-2003, Larry Wall

Perl may be copied only under the terms of either the Artistic License 

(and also ActiveState's is too)

C:\perl\bin>.\perl -v

This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)

Copyright 1987-2002, Larry Wall

Binary build 806 provided by ActiveState Corp. http://www.ActiveState.com
Built 00:45:44 Mar 31 2003

...

C:\perl\bin>.\perl -e "qx/cd/"

C:\perl\bin>.\perl -e "system( q/cd/ )"
C:\perl\bin

What do you make of this?

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


socket,perlctrl,Glob error

2004-02-10 Thread Jeremy A
Hi all

I have developed a perl control that creates a socket session. the socket 
is then returned to the program that called the control.
I get a glob error.

Thanks in advance for any help.

Regards,

Jeremy A.



here is the code snippets:
dll control code

sub ret_Stream
{
if ($Stream ne undef)
{
return $Stream; <--returns socket object to the calling program
}
}
--
perlctrl config code
'ret_Stream' => {
 DocString   => "The ret_Stream method",
 HelpContext => 104,
	 DispID  =>  4,
	RetType =>  VT_VARIANT, <- is this a suitable RetType for 
the socket?
	TotalParams =>  0,
	NumOptionalParams   =>  0,
	ParamList   =>[],
},
---
Calling program

  $Stream = $host->ret_Stream(); <-- this is where the socket gets 
returned into the program
  binmode $Stream; <---  get error here. it says "Not a 
GLOB reference .."

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


RE: Implementing flock on Windows 98

2004-02-10 Thread Peter Guzis
Well, the simplest solution is to not run Perl on Win9x (my choice).  However, if you 
absolutely need to run on that OS, you'll probably want to subclass 
CGI::Kwiki::Database and modify the file-locking functionality to suit your needs. I 
think Win32::SharedFileOpen, Win32::Mutex, and Win32::Sempahore would all be good 
candidates.  The latter two may only work on the same computer, though.


Peter Guzis
Web Administrator, Sr.
ENCAD, Inc.
- A Kodak Company
email: [EMAIL PROTECTED]
www.encad.com 
-Original Message-
From: Triton [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 1:44 AM
To: [EMAIL PROTECTED]
Subject: Implementing flock on Windows 98


Is there any way to troubleshoot the problem of flock() implementation in windows 98 
in order to serv perl script calls?

I have just installed a Kwiki software which includes a Database.pm making a call to 
flock().
When this happens , Apache server sends a error msg as follows:

' flock() unimplemented on this platform at :/Perl/lib/CGI/Kwiki/Database.pm line 32. '


WORKING ENVIRONMENT:
Windows System : Microsoft Windows 98 Version 4.10. A
DOS System : Microsoft MS-DOS Version 7.10 A
Perl 5.8.2.808 (binary build 808 provided by ActiveState)
Apache 2.0.48

Tks in advance for your help.
Fico LK

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


Handling values in forks

2004-02-10 Thread Sanjay Godbole

How do I handle variables, in case of threads? I have defined a variable
before forking and assigned it an initial value. 

In the parent thread, I am changing the value. But the forked process does
not get to know about this changed value. 

I thought, it might have got something to do with pass-by-reference. But,
pass-by-reference also doesn't work.

Is there a cleaner/better way for this?

Rgds,

Sanjay Godbole



__
Disclaimer: This e-mail message is intended only for the personal use of 
the recipient(s) named above.  If you are not an intended recipient, you 
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete 
the original message.
This e-mail expresses views only of the sender, which are not to be 
attributed to Rite Aid Corporation and may not be copied or distributed 
without this statement.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Net::SSH::Perl

2004-02-10 Thread Arms, Mike
Derek Jones [EMAIL PROTECTED] wrote:
> John Ramsden [EMAIL PROTECTED] wrote:
> > Just out of curiosity, in what sense did you find Math::Pari
> > a PoC?
> > 
> > Did you have trouble building it? I did a quick web search,
> > and saw a couple of plaintive posts by people having trouble
> > building it on AIX. I'm just wondering in case I ever need to
> > use it.
> 
> I could not get this (Math::Pari) to build on Win32 under 
> Cygwin. It was a known bug when I did a net crawl to find
> out more info. Anyone any more information? Activestate
> don't supply the module either, so I was seeking to build
> under the latest Cygwin port / toolset instead.
> 
> I had no problem building under Linux.
> 
> Derek Jones.

I successfully built it last night using "cpan" under Cygwin
on my WinXP-Pro system running the latest Cygwin updates.
I am using Cygwin's Perl 5.8.2-1 (the current version available).
Also, I may have required Cygwin's perl-libwin32 0.191-1
(the current version of this library) package. I am
using the most recent version of gcc and gnu make. Hope
this helps.

--
Mike Arms

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


Re: Uploading Files

2004-02-10 Thread $Bill Luebkert
Shain Edge wrote:
> Excuse the previous Message. Thank you.
> 
> Can anyone show me a code snippit that will allow you
> to upload files in a CGI environment to a perl script.
> That is, to place it into a directory.
> 
> The Server that I have an account is a bit on the
> paranoid side and instead of using regular FTP,
> requires access using an encrypted format. Telnet is
> the same, requires a login using a secure shell
> program.
> 
> It is probibally something easy to do, but I'm not
> sure where to start.

There's one on my Tripod site not tested on 5.8, but should
be OK.

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

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


Re: Net::SSH::Perl

2004-02-10 Thread Sisyphus
scunacc wrote:

I could not get this (Math::Pari) to build on Win32 under Cygwin. It was
a known bug when I did a net crawl to find out more info. Anyone any
more information? Activestate don't supply the module either, so I was
seeking to build under the latest Cygwin port / toolset instead.
Perl 5.6:
ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Math-Pari.ppd
Perl 5.8
ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-Pari.ppd
Cheers,
Rob
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Net::SSH::Perl

2004-02-10 Thread scunacc
Dear Rob,


> Perl 5.6:
> ppm install http://theoryx5.uwinnipeg.ca/ppmpackages/Math-Pari.ppd
> 
> Perl 5.8
> ppm install http://theoryx5.uwinnipeg.ca/ppms/Math-Pari.ppd

Aha! Thank you!

Kind regards

Derek.


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


Socket hang on non responding IP

2004-02-10 Thread David Liouville
I try to make a network scanner, i've some hosts that doesn't respond to
ping (icmp) or echo.
I try a socket system with connection to some std ports (21,22,23,80,113
...) but when run on windows with activeperl socket connection hang when
IP doesn't correspond to a responding host.
Timeout value for socket does noting and i've read that it isn't
implemented.
No success with alarm use wich make VERY LONG time to give back hand ...

Please, is there a workaround ?

David Liouville

ADR  : 1bis rue St Louis 35000 Rennes
GSM : 06 70 20 71 53
TEL   : 02 99 79 78 17
FAX  : 02 99 79 78 17
WEB : http://www.vraiment-pas.net
 

There are 10 types of people in the world: 
Those who understand binary...and those who don't... 

Un philosophe est un homme qui cherche de nuit dans une salle noire un
chat noir qui n'y est pas Un théologien, c'est la même chose
mais des fois il trouve le chat.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.577 / Virus Database: 366 - Release Date: 03/02/2004
 


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


Uploading Files

2004-02-10 Thread Shain Edge
Excuse the previous Message. Thank you.

Can anyone show me a code snippit that will allow you
to upload files in a CGI environment to a perl script.
That is, to place it into a directory.

The Server that I have an account is a bit on the
paranoid side and instead of using regular FTP,
requires access using an encrypted format. Telnet is
the same, requires a login using a secure shell
program.

It is probibally something easy to do, but I'm not
sure where to start.

Shain

=
Mekton Compendium: http://groups.yahoo.com/group/mekton-c/
Subscribe: http://groups.yahoo.com/subscribe/mekton-c

Nothing is impossible. the supposidly impossible can be made possible by anyone who 
determines what you need to do to make it a reality. -Shain Edge

__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: byte handling query

2004-02-10 Thread Sanjay Godbole

This is a bidirectional port on 1025 (not 9100. 9100 is unidirectional). And
yes, I am using IO::Socket Hence, I think one of the streams is left open,
which blocks the printer. I am not able to make out which one. Here is the
socket, I am using

my $printerSocket = new IO::Socket::INET(
  PeerAddr => $printerAddress,
  PeerPort => $$printerPort,
  Proto=> 'tcp');


Rgds,

Sanjay Godbole


-Original Message-
From: Jarvis, John [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 10, 2004 3:48 PM
To: 'Sanjay Godbole'
Cc: [EMAIL PROTECTED]
Subject: RE: byte handling query


If you communicate with your printer directly (e.g. Raw Socket on port 9100;
not LPR), the IO::Socket commands should be able to handle it.  If the
commands being sent to the printer cause the print processing to hang, that
may not be a network issue.

I once had to put together a test script to confirm that a PCL/HPGL -capable
printer was handling the page and print commands.  It's not pretty but it
works and was understood by others without too much head scratching.

HTH,
jtj



__
Disclaimer: This e-mail message is intended only for the personal use of 
the recipient(s) named above.  If you are not an intended recipient, you 
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete 
the original message.
This e-mail expresses views only of the sender, which are not to be 
attributed to Rite Aid Corporation and may not be copied or distributed 
without this statement.

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


Re: timelocal and localtime seem to have a problem prior to 19700101

2004-02-10 Thread $Bill Luebkert
Maher, Howard wrote:

> When I attempt to pass negative values into localtime (or timelocal) to denote 
> seconds prior to the epoch, January 1st, 1970, I get values back that peg the date 
> as January 0th, 1900.  Why do we have this limit on these functions?  or am I just 
> missing something?

Who ever said you could pass negative numbers ?

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--<  o // //  Castle of Medieval Myth & Magic http://www.todbe.com/
-/-' /___/_<_http://dbecoll.tripod.com/ (My Perl/Lakers stuff)

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


RE: Net::SSH::Perl

2004-02-10 Thread scunacc
Thanks Mike, I will have another go.

> I successfully built it last night using "cpan" under Cygwin
> on my WinXP-Pro system running the latest Cygwin updates.
> I am using Cygwin's Perl 5.8.2-1 (the current version available).
> Also, I may have required Cygwin's perl-libwin32 0.191-1
> (the current version of this library) package. I am
> using the most recent version of gcc and gnu make. Hope
> this helps.

Kind regards

Derek.


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


RE: byte handling query

2004-02-10 Thread Jarvis, John

If you communicate with your printer directly (e.g. Raw Socket on port 9100;
not LPR), the IO::Socket commands should be able to handle it.  If the
commands being sent to the printer cause the print processing to hang, that
may not be a network issue.

I once had to put together a test script to confirm that a PCL/HPGL -capable
printer was handling the page and print commands.  It's not pretty but it
works and was understood by others without too much head scratching.

HTH,
jtj
-Original Message-
From: Sanjay Godbole [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 10, 2004 6:46 AM
To: 'Jarvis, John'
Cc: [EMAIL PROTECTED]
Subject: RE: byte handling query



I am able to send and receive data from the printer properly. 

However, I still have one problem! After executing the program every time, I
have to explicitly turn the printer off and back on. This is because; the
program is not able to successfully close the connection. I am closing the
socket explicitly. I think something else needs to be closed too.

I tried the similar program in Java. There, I am able to close the
connection under one condition. I follow the below steps:
1. Open Socket 
2. Define OutputStream (Enquiry request bytes) & send it 
3. Open InputStream & start reading it. 
4. Close InputStream 
5. Close Socket

I think, I need to close something more, before just closing the socket. I
don't know what. 

Can somebody help me please?

Rgds,

Sanjay Godbole




__
Disclaimer: This e-mail message is intended only for the personal use of 
the recipient(s) named above.  If you are not an intended recipient, you 
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete 
the original message.
This e-mail expresses views only of the sender, which are not to be 
attributed to Rite Aid Corporation and may not be copied or distributed 
without this statement.



pcl_file-to-Raw-Socket.pl
Description: Binary data


RE: timelocal and localtime seem to have a problem prior to 19700 101

2004-02-10 Thread Chris Snyder
I don't know why we have this legacy problem.  You can, however, use
Date::Manip to get around some of this.  Look at the man page or html pages
for this module.  You might want to look at the function
"Date_SecsSince1970" and "ParseDateString".

I have found some of the date functions to be annoying, but I do believe
that their goal is more to conform to standards than to remove annoyances.

-- Chris Snyder

Howard Maher wrote:

>When I attempt to pass negative values into localtime (or timelocal) to
denote seconds
>prior to the epoch, January 1st, 1970, I get values back that peg the date
as January 0th,
>1900.  Why do we have this limit on these functions?  or am I just missing
something?
>
>Howard Maher
>[EMAIL PROTECTED]

___
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: Perl and delphi interaction query.

2004-02-10 Thread Lynn. Rickards


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Beckett Richard-qswi266
> Sent: Tuesday, February 10, 2004 12:13 PM
> To: '[EMAIL PROTECTED]'
> Subject: Perl and delphi interaction query.
> 
> 
> Guys,
> 
> I inherited a delphi GUI, which is too complicated to even consider
> re-writing.
> 
> So, I added a button that fires of a perl .exe, made with perlapp.
> 
> The perl .exe works perfectly when run alone. It uses Tk and 
> a ROText widget
> to display the progress of the script, and I changed the Tk 
> icon in the
> corner to my own, like this...
> 
> my $mw = MainWindow -> new (-title => "   $title $version");
> $mw -> withdraw;
> $mw -> minsize (qw(600 400));
> my $status = $mw -> ROText()->pack(-expand, 1, -fill, 'both');
> my $button = $mw -> Button (
>   -text , 'Cancel',
>   -command, \&finished,
>   ) -> pack (-side, 'bottom');
> my $icon = $mw->Photo(-file => 'SpikeWare.gif');
> $mw->idletasks;
> $mw->iconimage($icon);
> $mw -> Popup;
> $mw -> focus;
> 
> However, when I run this by clicking on the button from the 
> delphi created
> gui, the script just dies.
> 
> If I then remove the 3 lines that change the icon:
> my $icon = $mw->Photo(-file => 'SpikeWare.gif');
> $mw->idletasks;
> $mw->iconimage($icon); <- this seems to be the main culprit.

Can't help with delphi but in view of your analysis try using
a .xpm image, which can be included in your script like so...

$mw->Pixmap( 'myicon', -data => loadIcon());
$mw->Icon( -image => 'myicon' );

sub loadIcon
{
return <<'EOT';

/* XPM */
static char *image_xpm[] = {
/* width height ncolors chars_per_pixel */
"30 30 66 1",
"  c #002d31",
". c #00314a",
"+ c #001836",
"@ c #030303",
"# c #16b0c9",
"$ c #07edf2",
"% c #0ec9d6",
"& c #25abca",
"* c #e9f8e9",
"= c #1999c4",
"- c #150205",
"; c #031405",
"> c #26c6d6",
", c #040515",
"' c #2fa595",
") c #cc93b8",
"! c #f9e9e8",
"~ c #268eb4",
"{ c #26cde9",
"] c #2b79a7",
"^ c #eafbf8",
"/ c #030625",
"( c #4fc39a",
"_ c #011627",
": c #2e7297",
"< c #171525",
"[ c #2c8798",
"} c #27ebf6",
"| c #041516",
"1 c #35887b",
"2 c #160415",
"3 c #56c6b5",
"4 c #148b97",
"5 c #2897c5",
"6 c #03e6bb",
"7 c #558377",
"8 c #6a93ab",
"9 c #eaebea",
"0 c #1a7aa6",
"a c #26050d",
"b c #1995b5",
"c c #8bedf9",
"d c #06ebd6",
"e c #fdfdfd",
"f c #2ac5b9",
"g c #69aab2",
"h c #151407",
"i c #052510",
"j c #14a8b9",
"k c #28b5e5",
"l c #faebf7",
"m c #160425",
"n c #17b9e3",
"o c #518b94",
"p c #09c9b7",
"q c #27a6b8",
"r c #eeeddb",
"s c #f48af4",
"t c #0ea899",
"u c #f377f9",
"v c #daf6ec",
"w c #f8f9eb",
"x c #52abb1",
"y c #56d3e6",
"z c #29e6d7",
"A c #0bd5e5",
"e@@@, ~~~b~bb55~0~5~b~~]]~",
"@@|__~~bq=bb~b5~qj=&b'~b:@",
",~]b~b55qbb1|ooo7@@ww@;-bb~~~t",
"m=j~&o<-@@[EMAIL PROTECTED]",
"[:b[bbb5,@eew![EMAIL PROTECTED]",
",,bbjq&|e@eewee;&&=qqb",
"a/jq==o-eewwwwe/j##==t",
";b5#&b<[EMAIL PROTECTED];;j##&b#",
",~j5#,[EMAIL PROTECTED],###bjb",
",j=&[EMAIL PROTECTED]@-&&q",
"bj5&pwewew;;@[EMAIL PROTECTED]@",
"qq=#jwwwl@@,,-@@ A%%&@",
"qj&j>[EMAIL PROTECTED],pdA%x2>%%##@",
"5##jpti>f,su,A}A%>/;#%#>%@",
"[EMAIL PROTECTED])>ddpAA@@{%%#j@",
"%nkA%Ad{A,,[EMAIL PROTECTED]@",
"&##%#%pA$AAd},@,}AAAd-9%{%%##@",
"#j%#>,,A%AA$Ap2d}$$$,e!AdA%%%@",
"#%##p@;pAA$AA$.d-rcA%pA%%@",
"&#>[EMAIL PROTECTED]|^%%$A%%_@",
"n%%#n@,[EMAIL PROTECTED]@@",
"[EMAIL PROTECTED]/$$|re!-{AAA%%;@",
"[EMAIL PROTECTED]@[EMAIL PROTECTED]@@[EMAIL PROTECTED]",
"-j,f#/@A%$%$$,@; $$d,$$AAd%p;@",
"@;@%%nh%%A$$2; dzAA%,-",
"@eek%n-pn$Am,z}$$}d$A$AAA%n%##",
"eeeon%,@%(,_$d$d{3AAA%A#%%",
"eee,#f-@@_d{g@@m-adAA%%#8#",
"ee-_>{;-/%dnd ,-adAA%%>j,@",
"ee,>&&@[EMAIL PROTECTED],,",
};
EOT
}

HTH - Lynn.
> 
> It works perfectly under all circumstances.
> 
> I really want to use my icon, so does anyone know why it 
> won't run when
> fired off from delphi?


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


RE: Net::SSH::Perl

2004-02-10 Thread scunacc
Dear folks,

> Just out of curiosity, in what sense did you find Math::Pari
> a PoC?
> 
> Did you have trouble building it? I did a quick web search,
> and saw a couple of plaintive posts by people having trouble
> building it on AIX. I'm just wondering in case I ever need to
> use it.

I could not get this (Math::Pari) to build on Win32 under Cygwin. It was
a known bug when I did a net crawl to find out more info. Anyone any
more information? Activestate don't supply the module either, so I was
seeking to build under the latest Cygwin port / toolset instead.

I had no problem building under Linux.

Derek Jones.

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


timelocal and localtime seem to have a problem prior to 19700101

2004-02-10 Thread Maher, Howard
When I attempt to pass negative values into localtime (or timelocal) to denote seconds 
prior to the epoch, January 1st, 1970, I get values back that peg the date as January 
0th, 1900.  Why do we have this limit on these functions?  or am I just missing 
something?

Howard Maher
[EMAIL PROTECTED]

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


RE: Perl and delphi interaction query.

2004-02-10 Thread Gerber, Christopher J
> -Original Message-
> From: Beckett Richard-qswi266 [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 10, 2004 12:13
> 
> If I then remove the 3 lines that change the icon:
> my $icon = $mw->Photo(-file => 'SpikeWare.gif');
> $mw->idletasks;
> $mw->iconimage($icon); <- this seems to be the main culprit.
> 
> It works perfectly under all circumstances.
> 
> I really want to use my icon, so does anyone know why it won't run when
> fired off from delphi?

Richard,

Can you provide the Delphi code that you are using to launch the PerlApp?

Chris


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be privileged. 
It is intended for the addressee(s) only. Access to this E-mail by anyone else is 
unauthorized. If you are not an addressee, any disclosure or copying of the contents 
of this E-mail or any action taken (or not taken) in reliance on it is unauthorized 
and may be unlawful. If you are not an addressee, please inform the sender immediately.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Perl code compilation problem

2004-02-10 Thread Chris Jones
You need to have a C++/C Compiler installed - Visual C++ or Borland, 
etc.  If you have one installed, then you need your command line paths set 
to point to the include and library directories.

At 11:43 10/02/2004, Sanjay Godbole wrote:

I am trying to compile my code. I get following errors. Can somebody tell me
how I get rid of them? How do I get executable made:
Note (probably harmless): No library found for oldnames.lib
Note (probably harmless): No library found for kernel32.lib
Note (probably harmless): No library found for user32.lib
Note (probably harmless): No library found for gdi32.lib
Note (probably harmless): No library found for winspool.lib
Note (probably harmless): No library found for comdlg32.lib
Note (probably harmless): No library found for advapi32.lib
Note (probably harmless): No library found for shell32.lib
Note (probably harmless): No library found for ole32.lib
Note (probably harmless): No library found for oleaut32.lib
Note (probably harmless): No library found for netapi32.lib
Note (probably harmless): No library found for uuid.lib
Note (probably harmless): No library found for wsock32.lib
Note (probably harmless): No library found for mpr.lib
Note (probably harmless): No library found for winmm.lib
Note (probably harmless): No library found for version.lib
Note (probably harmless): No library found for odbc32.lib
Note (probably harmless): No library found for odbccp32.lib
Note (probably harmless): No library found for msvcrt.lib
'cl' is not recognized as an internal or external command,
operable program or batch file.
LINK : fatal error LNK1181: cannot open input file "a.exe.obj"
Rgds,

Sanjay Godbole



__
Disclaimer: This e-mail message is intended only for the personal use of
the recipient(s) named above.  If you are not an intended recipient, you
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete
the original message.
This e-mail expresses views only of the sender, which are not to be
attributed to Rite Aid Corporation and may not be copied or distributed
without this statement.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Chris Jones, P. Eng.
14 Oneida Avenue
Toronto, ON M5J 2E3
Tel. 416 203-7465
Fax. 416 203-8249


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