Raw data to and from network card

2003-01-17 Thread Suresh Govindachar
Hello, From a workstation -- Linux or Windows -- I would like to: 1) assign my perl script a tcpip port and receive all tcpip data coming into the workstation for that port -- BUT with the tcpip header. OK if the ethernet header is stripped, but the IP and TCP header need to show

Re: File::NCopy doesn't work with path/file names with spaces?

2004-09-07 Thread Suresh Govindachar
$Bill Luebkert Sent on 07 Sep 2004 06:04:03 -0700: Richard Joh wrote: [as in subject] Go to line 175 and add this line : use File::Glob; Find this line around 508 : push @args, glob $_[$i]; and comment it out and follow it with : push @args, File::Glob::glob $_[$i];

Re: mailcap replacement for windows

2004-10-24 Thread Suresh Govindachar
* Moshe Kaminsky Sent on 19 Oct 2004 22:32:50 +0200: I'm looking a perl module that provides functionality similar to Mail::Cap, but for windows (or better yet, platform independently). Specifically, I would like to be able to: - view data with the system default viewer for the

Re: GUI front End

2004-10-24 Thread Suresh Govindachar
Hello, In regard to data exchange between perl and vb, BigAL wrote on 20 Oct 2004 17:36:23 -1000 that he ended up opening up a vb tcp server and pushed perl output to as a tcp client Where can I find documentation and/or sample code about the VB portion of the solution? Thanks,

Re: UNIX utilities in Perl

2004-11-10 Thread Suresh Govindachar
Several years ago, Tom Christiansen started the Perl Power Tools project with a goal of reimplementing all the Unix utilities in Perl. They got reasonably far, but the project stagnated around 2001. However, this year a new site was born for it, so they may have regained momentum:

perl and Microsoft Exchange e-mail

2004-12-10 Thread Suresh Govindachar
Hello, How do I go about using perl to send and receive mail from a Microsoft Exchange e-mail server? As context in regard to my experience with perl and email, I know how to use Net::SMTP and Net::POP3 to send and receive mail and to deal with the e-mails being stored on the

Fwd: perl and Microsoft Exchange e-mail

2004-12-13 Thread Suresh Govindachar
in question. I can send some examples of OLE/Outlook if you like. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Sobey Sent: Monday, December 13, 2004 4:17 AM To: Suresh Govindachar Cc: Perl-Win32 Subject: RE: perl and Microsoft Exchange e-mail

Name-conflict (head) between ppt and lwp on Windows

2005-01-05 Thread Suresh Govindachar
Hello, The ppt (Unix Reconstruction Project 0.14) and lwp have three files with the same name (ignoring case): on Windows: perl/bin/HEAD perl/bin/HEAD.bat perl/html/bin/HEAD.html --Suresh ___ Perl-Win32-Users mailing list

Re: Name-conflict (head) between ppt and lwp on Windows

2005-01-05 Thread Suresh Govindachar
$Bill Luebkert Sent on 05 Jan 2005 15:52:44 -0800: Suresh Govindachar wrote: $Bill Luebkert Sent on 05 Jan 2005 12:09:39 -0800: Suresh Govindachar wrote: Hello, The ppt (Unix Reconstruction Project 0.14) and lwp have three files with the same name (ignoring case): on Windows: perl

Modules for decoding MIME

2005-01-12 Thread Suresh Govindachar
Hello, I am looking for as simple and direct a way as possible to decode MIME encoded files (such as decoding Content-Type: text/plain; charset=iso-8859-1, Content-Transfer-Encoding: quoted-printable). Based on a book I looked at, I am considering looking at Eryq's MIME::Lite -- but that's a

Using VBA functions as-is

2005-02-25 Thread Suresh Govindachar
Hello, There are Visual Basic for Applications (VBA) and Visual Basic Script examples which I would like to use as-is in perl. In the code below, the VBA subroutine FooCreateFolders() calls the VBA function GetFolderVBA(). The point is that although I plan to redo the VBA subroutine

Win32::OLE - Setting VBA property

2005-03-08 Thread Suresh Govindachar
Hello, If myDestination is a folder in Microsoft Outlook VBA code, it is possible to execute a VBA line such as the following: myDestination.Items(1).UnRead = 1 This will mark the first mail inside the folder myDestination as unread (setting the mail item's UnRead property to true). I tried

Strange VBA code works; but can't make it work in Win32::OLE perl

2005-03-08 Thread Suresh Govindachar
Hello again, In VBA and in Win32::OLE perl, I have code to traverse the folders in Microsoft Outlook and to figure out which folders have unread messages. My goal is that every folder that has unread messages should have all its parent-folders displayed in Outlook with [-]. By trial and error,

perldoc with multiple tries

2005-03-14 Thread Suresh Govindachar
Hello, What's a good way to put a wrapper on perldoc so that a call such as perldoc -k [options] arg acts as follows: if perldoc [options] arg succeeds, returns it; else if perldoc [options] -f arg succeeds, returns it; else if perldoc [options] -q arg succeeds, returns it;

Re: Store hash in SQL - Data::Dumper

2005-05-02 Thread Suresh Govindachar
Chris Sent on 2 May 2005 16:02:02 -0400: I can now turn the %hash into text, but I don't understand how to make it correctly formatted. --- %hash = ( 'John' = { 'eyes' = 'green', 'hair' = 'brown', 'clothes'

Re: Automating Outlook Messaging

2005-07-30 Thread Suresh Govindachar
Hirosi Taguti sent on 27 Jul 2005 14:22:16 +0900: I was searching the way to Automate Outlook Messaging. And has found some of modules, Win32::MAPI, Mail::Outlook... I tried these modules and tried to write scripts using OLE MAPI.session, but I got popups asking me password or Yes/No on

HTML::GoogleMaps or Other Way to show multiple addresses on a map

2005-07-30 Thread Suresh Govindachar
Hello, I would like to show multiple addresses on a map -- from a user PC (rather than from a web-server). I am hoping to have a perl script read in a list of addresses and generate a html page. All the input addresses would be within about 20 miles of each other; and each address in the list

Re: HTML::GoogleMaps or Other Way to show multiple addresses on a

2005-07-30 Thread Suresh Govindachar
| robert pointed out on 30 Jul 2005 19:25:39 -0700 that, | unlike Internet Explorer, the Mozilla Firefox browser | can display the following link without errors | http://www.cs.wisc.edu/~nmueller/fsbo_open_houses.pl However, that doesn't answer the original question sent on 30 Jul 2005 15:20:55

Re: HTML::GoogleMaps or Other Way to show multiple addresses on a

2005-07-30 Thread Suresh Govindachar
Suresh Govindachar sent on 31 Jul 2005 04:17:37 +: robert pointed out on 30 Jul 2005 19:25:39 -0700 that, unlike Internet Explorer, the Mozilla Firefox browser can display the following link without errors http://www.cs.wisc.edu/~nmueller/fsbo_open_houses.pl However

Re: Need help with Perl GUI

2005-08-02 Thread Suresh Govindachar
Jaime Teng asked on 03 Aug 2005 10:31:03: Does anyone have a good win32::gui website or book even? See the very-recent anouncement below: | From: Robert May [EMAIL PROTECTED] | To: [EMAIL PROTECTED], | Date: Tue, 02 Aug 2005 22:35:15 +0100 | Subject: [perl-win32-gui-users] ANNOUNCE:

Re: HTML::GoogleMaps or Other Way to show multiple addresses on a

2005-08-04 Thread Suresh Govindachar
$Bill Luebkert Sent on 04 Aug 2005 07:36:35 -0700: Suresh Govindachar wrote: One answer to the question I asked earlier: I would like to show multiple addresses on a map -- from a user PC (rather than from a web-server). I am Why not a webserver on your local PC ? You can

Perl based formatting

2005-10-07 Thread Suresh Govindachar
Hello, I am looking for recommendations on perl based text formatting and aligning utilities/modules. On cpan, I found Text::Reflow, Text::Format, Text::Aligner and Text::Table, but I am hoping to get responses from people who use (or have evaluated) such modules. (Various people recommended

cd the cmd shell from perl (as can be done from bat file)

2005-10-27 Thread Suresh Govindachar
Hello, When a .bat file with just the line: cd c:\some\where is executed from the Windows cmd shell, then when the .bat file terminates, the directory of the shell would have changed to c:\some\where. How do I get the same effect after running a perl script? (See

Re: cd the cmd shell from perl (as can be done from bat file)

2005-10-27 Thread Suresh Govindachar
Jan Dubois sent on Thu, 27 Oct 2005 15:42:35 -0700: On Thu, 27 Oct 2005, Suresh Govindachar wrote: Hello, When a .bat file with just the line: cd c:\some\where is executed from the Windows cmd shell, then when the .bat file terminates, the directory of the shell would

Re: Modules for decoding MIME

2005-10-30 Thread Suresh Govindachar
Suresh Govindachar Sent on Wed, 12 Jan 2005 16:22:25 +: I am looking for as simple and direct a way as possible to decode MIME encoded files (such as decoding Content-Type: text/plain; charset=iso-8859-1, Content-Transfer-Encoding: quoted-printable). Based on a book I

Understanding Text::Autoformat via mal-examples

2005-11-18 Thread Suresh Govindachar
#!/use/bin/perl =head Hello, I read the documentation for Autoformat. It seeks to provide automatic formatting meaning formatting while taking cognizance of the context. I can appreciate the value of such a tool. And I can appreciate the complexity of the task involved. I would like

emptyenum redefined in OLE/Const.pm line -1?

2005-12-02 Thread Suresh Govindachar
Hello, When I open vim.exe in a shell, I get this message: c:\home\sureshc:\opt\vim\vim63\vim.exe Constant subroutine emptyenum redefined at C:/opt/perl/site/lib/Win32/OLE/Const.pm line -1 (#1) Constant subroutine emptyenum redefined at

RE: Working example of code that runs as EXCEL macro/module

2005-12-14 Thread Suresh Govindachar
If one examines the url provided (rather than just going clickty-click with the mouse), one can see how to get to their sites (see PS below). However, those sites won't answer your need, viz: [you] want to run perl code as a function/module inside EXCEL, in the same way that

RE: perldoc

2005-12-15 Thread Suresh Govindachar
$Bill Luebkert Sent on December 15, 2005 8:29 PM -0800 Suresh Govindachar wrote: Wanting to capture the output of perldoc with a perl variable, I looked at perldoc.bat. What perldoc.bat does is run the following script with the arguments given to perldoc: snip

Even after runtime eval with no __DIE__, can't avoid dying inside perldoc

2005-12-17 Thread Suresh Govindachar
=head Hello, I have been trying to not die when calling perldoc, but the code below keeps dying inside perldoc. The code below does show that eval is happening at runtime, and that the syntax used for shutting off __DIE__ does work when perldoc is not involved. So how can

Re: Even after runtime eval with no __DIE__, can't avoid dying inside

2005-12-18 Thread Suresh Govindachar
Hello, $Bill, thanks for your code. I noticed one strange thing: Compare the output of running the code with the arguments -a perldoc and just perldoc. In the -a case, the output is raw pod. Another thing I found is that the scheme of assigning a variable to STDOUT and STDERR doesn't

Re: Sending email with authentication using Net::SMTP.

2005-12-19 Thread Suresh Govindachar
On Mon, 19 Dec 2005 12:37:47 -0800 (PST) Joydeep Yadav asked Is anyone aware of any method of sending email with authentication using Net::SMTP or any other module. At this point I am experimenting trying to send email using perl v 5.6.1. Code in

Re: Working example of code that runs as EXCEL macro/module

2005-12-31 Thread Suresh Govindachar
From the discussion Win32::OLE to write macro to Excel workbook?, something called PerlCOM might help to replace VB script http://opensource.activestate.com/authors/jandubois/Perl/TPC3/fun.html#Using_PerlCOM_Babelfish_for_Mic --Suresh ___

RE: Classes as modules?

2006-01-10 Thread Suresh Govindachar
Studying Damian Conway's Object Oriented Perl http://www.manning.com/books/conway will help in getting an understanding of Object Oriented Programming in general (as an abstract concept and as it is implemented in a few languages) and as it applies to programming in perl.

RE: Iffor

2006-04-18 Thread Suresh Govindachar
Ng, Bill asked on April 18, 2006 12:59 PM So if my array was: @a=(1,2,3,4,5); And we assume that I don't want to execute the block if the value of $_ is 3 ... Then, in my head, I'm looking for the WORKING (key word there) version of this: --- @a =

RE: Iffor

2006-04-18 Thread Suresh Govindachar
Ng, Bill wrote: Performance isn't really what I'm going for, just simpler code. For the past 4 years, I've been coding to get the job done, no matter how many lines it takes or how ugly it is to read, as long as it works that's fine. But recently you guys have shown

Opening an Excel workbook with links to other data sources

2006-04-18 Thread Suresh Govindachar
Hello, When I manually open an Excel file, it bring up a dialog box stating that the workbook contains links to other data sources and asking if the data should be updated. The following perl code brings up a similar dialog box: use Win32::OLE qw(in with); use

Re: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Suresh Govindachar
Hello, Issue: opening an excel file brings up a dialog box stating that the workbook contains links to other data sources and asks if the data should be updated. Just-in's suggestion of adding $Excel-{DisplayAlerts} = 0; to modify the code to be:

RE: Opening an Excel workbook with links to other data sources

2006-04-19 Thread Suresh Govindachar
Lynn. Rickards Sent: Wednesday, April 19, 2006 6:02 PM Suresh Govindachar wrote: Hello, Issue: opening an excel file brings up a dialog box stating that the workbook contains links to other data sources and asks if the data should

RE: SIGINT

2006-04-20 Thread Suresh Govindachar
Ng, Bill Sent: Thursday, April 20, 2006 8:10 AM Anyone play with signal handlers on the Win32 platform? Specifically, I'm trying to print a message when CTRL-C is pressed but I'm getting nowhere: This works on my linux box. CTRL-C (while waiting for user input) prints This

perl\lib\ExtUtils\xsubpp or perl\lib\core issue

2006-04-21 Thread Suresh Govindachar
Hello, Something in perl 816 (perhaps perl\lib\ExtUtils\xsubpp or perl\lib\core) doesn't like the identifier __attribute__ whereas earlier builds had no such issue. C:\Programs\perl\Lib\Core if_perl.c if_perl.c if_perl.xs(158) : error C2061: syntax error : identifier

RE: Ignoring unwanted use

2006-04-21 Thread Suresh Govindachar
David Ressler asks: I have a library of Perl routines in which use Authen::SASL; appears and is used in some, but not all, of my various websites. In those sites where I don't use it, Authen is not installed, but the script fails in these sites because use is evaluated at

RE: Easy One

2006-05-02 Thread Suresh Govindachar
[resending with a better counter-example] Luke Bakken wrote: use strict; my $str = ''; matchit(); $str = ''; matchit(); sub matchit { if (length $str == 8) { $str =~ /^(\D+)(\d+)$/; print \$1 $1 \$2 $2\n;

RE: Problem with print function

2006-05-08 Thread Suresh Govindachar
Karl-Heinz Kuth wrote: I've got the following problem: use strict; use warnings; my $char = -; my $number_of_lines = 3; my $number_of_chars = 20; print This is the output I want: \n; my $line = $char x $number_of_chars . \n; print $line x

Clipboard update to perl automatically

2006-10-01 Thread Suresh Govindachar
Hello, Whenever the Windows' clipboard is updated, is it possible for a perl program to get a notification and to copy the update into a variable? Then, sending a Ctrl-C signal to the program should cause the program to print all the updates made since the program started. (The

Evaluating inside a here document

2006-10-21 Thread Suresh Govindachar
Hello, |use warnings; |use strict; | |# Question: In the following, any suggestions for ensuring |#that $stuff will be Twice 3 is 6? |# |#For example, if the here-document were re-written |#to be something like: |#

RE: Evaluating inside a here document

2006-10-22 Thread Suresh Govindachar
$Bill Luebkert wrote: Suresh Govindachar wrote: Hello, |use warnings; |use strict; | |# Question: In the following, any suggestions for ensuring |#that $stuff will be Twice 3 is 6? |# |#For example, if the here-document were

RE: Evaluating inside a here document

2006-10-22 Thread Suresh Govindachar
$Bill Luebkert wrote: Suresh Govindachar wrote: Thanks for @{[]} -- it is better than evaluating outside the here doc. This is because the expressions I need to evaluate are fairly complex and the variables involved come from hashes. Moreover, I would like to do

Accessing item in Windows XP's System Tray

2006-12-04 Thread Suresh Govindachar
Hello, How do I access items in Windows XP's System Tray and manipulate them? (Juniper VPN creates an icon in the Windows XP's tray. Clicking on this icon brings up a dialog box titled Network Connect with buttons labeled , Hide and Sign Out. I would like to access this item from

RE: Accessing item in Windows XP's System Tray

2006-12-04 Thread Suresh Govindachar
I found the following http://support.microsoft.com/kb/q162613/ titled How To Manipulate Icons in the System Tray with Visual Basic but cannot figure out how to use that information to access items in Windows XP's System Tray and manipulate them. Here's my interest: Juniper VPN

RE: Accessing item in Windows XP's System Tray

2006-12-04 Thread Suresh Govindachar
Hello again, I found something titled Getting a list of apps shown in system tray: http://www.codeguru.com/forum/archive/index.php/t-4707.html and another thing titled How To Manipulate Icons in the System Tray with Visual Basic at http://support.microsoft.com/kb/q162613/

RE: Accessing item in Windows XP's System Tray

2006-12-04 Thread Suresh Govindachar
=head Background: Juniper VPN creates an icon in the Windows XP's tray. Clicking on this icon brings up a dialog box titled Network Connect with buttons labeled , Hide and Sign Out. Here's some code to get started with accessing this item from a perl script and selecting Sign Out.

Replacing WWW::Mechanize with Win32::OLE via IE

2006-12-14 Thread Suresh Govindachar
Hello, I found two good references for using Win32::OLE as a replacement for WWW::Mechanize on Windows (the first is by Jan Dubois): http://library.n0i.net/programming/perl/pe-rlmonth/issue3/ole_controls.html http://www.perl.com/lpt/a/916 In my application, the current page

Why does ASPN's archive lag so far behind?

2006-12-20 Thread Suresh Govindachar
Hello, The newest posting on ASPN's archive of perl-win32-users mailing list http://aspn.activestate.com/ASPN/Mail/Browse/Plain/perl-win32-users/ is from December 14 which is about 6 days ago! Why does the ASPN's mailing-list archive lag so far behind? --Suresh

RE: hash table question

2007-08-08 Thread Suresh Govindachar`
Mark Funk asked: What exactly does the following Perl code do? %hash=(); open(PREVFILE, $prevfile) or die(Unable to open previous file); while(PREVFILE) { chomp; last if /BREAK/; $seen{$_}++; } close(PREVFILE); Exactly, the code does nothing

Back-up drives to CD and other drives

2007-08-22 Thread Suresh Govindachar
Hello, On Windows, if you have used perl to make periodic back-ups of your hard-drives to CDs and/or other hard-drives, would you please share your experience (for example, what commands, modules and methods worked and what didn't work)? Include, pros and cons of invoking native Windows'

perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-24 Thread Suresh Govindachar
Hello, Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f): undefined reference to `Perl_sv_2iv_flags' Background: I got a new hard-drive -- everything (tools, utilities, sources etc.) is a

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-24 Thread Suresh Govindachar
Jan Dubois wrote: On Fri, 24 Aug 2007, Suresh Govindachar wrote: Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f): undefined reference to `Perl_sv_2iv_flags' This looks like you

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-24 Thread Suresh Govindachar
: Perl_sv_2iv_flags (undefined reference) On Fri, 24 Aug 2007, Suresh Govindachar wrote: Jan Dubois wrote: On Fri, 24 Aug 2007, Suresh Govindachar wrote: Building VIM with dynamic Perl support gives error messages such as the following: gobj/if_perl.o:if_perl.c:(.text+0x1c1f

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-24 Thread Suresh Govindachar
Sisyphus suggested linking with C:/opt/perl/lib/CORE/perl58.lib (which does have the symbols in it) in the command that creates if_perl.o and/or in the command that builds gvim.exe (which is also the command that reports the missing references). But the build is supposed to use the

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-27 Thread Suresh Govindachar
Sisyphus wrote: I would try adding -lperl58 to either this command (the command that builds if_perl.o): gcc -c -Iproto -DWIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_GETTEXT -DHAVE_LOCALE_H -DDYNAMIC_GETTEXT -DFEAT_OLE -DFEAT_CSCOPE

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-27 Thread Suresh Govindachar
Solved with help from Brian Dessent on the MinGW mailing list. Add -lperl58 at the very end (location matters) of the last command. --Suresh ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe:

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-27 Thread Suresh Govindachar
When mingw is used to build gvim with dynamic support for perl: 1) For older versions of ActivePerl, there is no need to add -lperl58 The linker somehow knows that perl58 related symbols that it cannot resolve will be resolved at runtime via perl58.dll 2) For the

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-27 Thread Suresh Govindachar
Jan Dubois wrote: On Mon, 27 Aug 2007, Suresh Govindachar wrote: So ActiveState is exporting Perl_sv_2iv_flags and Perl_newXS_flags in a way that is different from the way they export other symbols. Nope, this is all incorrect. I've now downloaded the vim sources

RE: perl58.dll: Perl_sv_2iv_flags (undefined reference)

2007-08-28 Thread Suresh Govindachar
Jan Dubois wrote: On Mon, 27 Aug 2007, Suresh Govindachar wrote: Is there a better way to embed perl so as to be version independent? There really is no way to do it totally version independently. One reason the vim code is so tightly coupled is that it doesn't have

How to make this patch for vim work in more situations?

2007-08-29 Thread Suresh Govindachar
Hello, Here's what I came up with for a patch to account for two new symbols (Perl_sv_2iv_flags, Perl_newXS_flags) introduced in ActiveState perl for build 822 and later (these symbols were preventing the building of vim with dynamic support for perl). After patching, I tested

RE: How to make this patch for vim work in more situations?

2007-08-29 Thread Suresh Govindachar
Jan Dubois wrote: On Tue, 28 Aug 2007, Suresh Govindachar wrote: Here's what I came up with for a patch to account for two new symbols (Perl_sv_2iv_flags, Perl_newXS_flags) introduced in ActiveState perl for build 822 and later (these symbols were preventing the building

perl\lib\CORE\patchlevel.h

2007-08-29 Thread Suresh Govindachar
The file perl\lib\CORE\patchlevel.h defines: #define PERL_REVISION 5 /* age */ #define PERL_VERSION8 /* epoch */ #define PERL_SUBVERSION 8 /* generation */ Is the build number (e.g., 822) defined somewhere? If not, what is a good way for a make file (such as

RE: perl\lib\CORE\patchlevel.h

2007-08-30 Thread Suresh Govindachar
Sisyphus wrote: From: Suresh Govindachar . Is the build number (e.g., 822) defined somewhere? If not, what is a good way for a make file (such as vim's Make_ming.mak) to pick up the build number? Have the Make parse the output of perl --version? Would

Interpreting ppm message -- did ppm abort or continue?

2007-08-31 Thread Suresh Govindachar
Hello, When ppm upgrade reports: ppm upgrade failed: No ordering between package Digest-MD4-1.5 and Digest-MD4-1.5-r1 Did ppm abort examining other modules or did it continue to examine other modules? Thanks, --Suresh C:\home\suresh\developppm query digest*md*

Error message not showing up from Net::SMTP

2007-09-05 Thread Suresh Govindachar
Hello, Net::SMTP's sub auth() begins as (perl\site\lib\Net\SMTP.pm): sub auth { my (\$self, \$username, \$password) = [EMAIL PROTECTED]; eval { require MIME::Base64; require Authen::SASL; } or \$self-set_status(500, [Need MIME::Base64 and Authen::SASL todo

RE: Error message not showing up from Net::SMTP

2007-09-05 Thread Suresh Govindachar
Rob, You missed the entire context of the original post. The sub auth is INSIDE Net::SMTP; the code to try was attached below the signature. The issue: Error message FROM Net::SMTP is not being delivered to the user. The code to try (need to use valid $smtp_host):

RE: Error message not showing up from Net::SMTP

2007-09-05 Thread Suresh Govindachar
I see. My mistake in the quote -- the cut and paste I used resulted in the extra '\'. perl -MNet::SMTP -e print $Net::SMTP::VERSION 2.31 ppm query libnet -T-TT--┐ │ name │ version │ abstract

RE: Error message not showing up from Net::SMTP

2007-09-05 Thread Suresh Govindachar
Changing the user code to the following displays the desired error message: print ERROR: Could not authenticate user $user_id\n$!\n, $mail-code,':',$mail-message,\n; Thanks to Friar menolly and Chancellor ikegami on PerlMonks. --Suresh

ACTIVEPERL_VERSION used to be a string and so fails =822 test

2007-09-14 Thread Suresh Govindachar
Jan Dubois wrote: should be written more general like this: /* ActivePerl build 822 still identifies itself as 5.8.8 but * already contains many of the changes from the upcoming * Perl 5.8.9 release. */ #if (ACTIVEPERL_VERSION = 822) # define

RE: ACTIVEPERL_VERSION used to be a string and so fails =822 test

2007-09-14 Thread Suresh Govindachar
ACTIVEPERL_VERSION is a string in older versions of ActivePerl. Googling showed ACTIVEPERL_VERSION as a number in 5.8.7 build 813; and we are only concerned with later buids of 5.8.8. So I decided to use the following guard: #if (PERL_REVISION == 5) (PERL_VERSION == 8)

Big endian C to perl on x86 of binary file into structure

2007-09-14 Thread Suresh Govindachar
Hello, The following code is meant for a Big-endian processor running linux. The code reads binary files and assigns values to structures. I would like to read the same data files in perl on Windows on little endian x86. Any tips on doing the translation? typedef struct s_str_boo

RE: Big endian C to perl on x86 of binary file into structure

2007-09-16 Thread Suresh Govindachar
$Bill wrote: Suresh Govindachar wrote: The following code is meant for a Big-endian processor running linux. The code reads binary files and assigns values to structures. I would like to read the same data files in perl on Windows on little endian x86. Any tips on doing

RE: Fixing a one-liner (global binmode?)

2007-09-17 Thread Suresh Govindachar
$Bill wrote: Suresh Govindachar wrote: The following dos2unix one-liners perl -i~ -pe s/\r\n$/\n/ files fails in windows. I think it is because when perl writes the resulting file, it re-inserts \r\n! The following code almost works: [snipped

RE: Fixing a one-liner (global binmode?)

2007-09-17 Thread Suresh Govindachar
Steve wrote as a deprecated top post: $Bill wrote: Suresh Govindachar wrote: [almost working code] Try: $^I = '~'; no warnings 'once'; while () { binmode ARGVOUT if $. == 1; print; } The following worked -- didn't need to turn off warnings. #!/usr

RE: Fixing a one-liner (global binmode?)

2007-09-17 Thread Suresh Govindachar
$Bill wrote: Suresh Govindachar wrote: The following worked -- didn't need to turn off warnings. Not sure why, I get a warning on using ARGVOUT only once. Still no problems for me (5.8.8 on XP). #!/usr/bin/perl BEGIN {(*STDERR = *STDOUT) || die;} Not sure

ActivePerl and xs

2007-09-21 Thread Suresh Govindachar
Hello, I am starting to experiment with xs. The perl I have is 5.8.8, 18 patches, AS build 822. Printing myconfig() shows that the compiler used was cl and make used was nmake. However, I have MinGW. Question: to work out the examples in perlxstut, will I need to build my own

Windows PowerShell and .pl association

2007-09-23 Thread Suresh Govindachar
Hello, In the cmd.exe shell, I can run a .pl file by typing its name. However, in the new PowerShell, http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx I need to prefix the .pl file with perl. How can one get the file association to work in the PowerShell?

RE: Windows PowerShell and .pl association

2007-09-23 Thread Suresh Govindachar
Jan Dubois wrote: On Sun, 23 Sep 2007, Suresh Govindachar wrote: In the cmd.exe shell, I can run a .pl file by typing its name. However, in the new PowerShell, http://www.microsoft.com/technet/scriptcenter/topics/msh/download.mspx I need to prefix the .pl file

RE: Windows PowerShell and .pl association

2007-09-23 Thread Suresh Govindachar
Glenn asked: (They have taken the pleasant activity of working at a console and made it miserable drudgery. In cmd.exe, I had to be careful to use unix find rather than cmd.exe's find. In the power-shell, I am finding that more unix commands are over-ridden, for example, diff;

RE: Windows PowerShell and .pl association

2007-09-24 Thread Suresh Govindachar
IIRC the spacing issue is a standard problem for all programs. If any program (.Net, Java) path has a space, it also has to be quoted. You misunderstood the problem. In PS, c:\no\space\path.pl executes after the Jan's fix. In cmd.exe, c:\path with\space.pl executes But in

RE: Reading from STDIN, tricky question ...

2007-10-16 Thread Suresh Govindachar
Walter asked: How to find out, if the data from STDIN comes from a pipe or from the keyboard? My script is called in two modes: echo [TEXT] | smtp_send.pl ... or smtp_send.pl -message [TEXT] Inside the script, I read with: while( $zeile = ) {

RE: #ifdef-like way to make code work on both Windows/Linux?

2007-10-18 Thread Suresh Govindachar
Johan Holmberg asked: I have a Perl application that should work on both Windows and Linux. On Windows I use some of the Windows-specific modules, e.g. Win32API::File. So my code have things like: 1) use Win32API::File qw( :ALL ) 2) use of constans like GENERIC_WRITE and

ActivePerl, PerlApp, Win-Mobile and ATT Tilt

2008-01-17 Thread Suresh Govindachar
Hello, Would appreciate any suggestions on getting perl scripts to run on the ATT Tilt phone with Windows Mobile 6 Professional http://www.htcwiki.com/page/ATT+TILT I am guessing that since java apps can be run on phones, it would be possible to run perl scripts too. If the

Re: PDF to Text

2015-04-19 Thread Suresh Govindachar
On 4/19/2015 3:34 PM, Phil Brewer wrote: Hi Does anyone have any advise on converting a PDF to text, please (the data I want to read is tabular)? I have used PDF::API2 to create PDFs before but it does not seem to be able to read/parse them. I have also tried CAM::PDF but cannot get the