Re: error in Net::SFTP
Jutu Subramanian, Srinivasan (Cognizant) wrote: Hi, I am getting the following error after installing and executing the Net::SFTP application in perl. Can you please clarify? Can't locate Net/SSH/Perl/Buffer.pm in @INC (@INC contains: C:\Program Files\ActiveState Komodo 2.5 C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/Net/SFTP/Buffer.pm line 6. You need to install Net-SSH-Perl (I guess) ppm3 install Net-SSH-Perl Hth. Alex smime.p7s Description: S/MIME Cryptographic Signature ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
error in Net::SFTP
Title: error in Net::SFTP Hi, I am getting the following error after installing and executing the Net::SFTP application in perl. Can you please clarify? Can't locate Net/SSH/Perl/Buffer.pm in @INC (@INC contains: C:\Program Files\ActiveState Komodo 2.5 C:/Perl/lib C:/Perl/site/lib .) at C:/Perl/site/lib/Net/SFTP/Buffer.pm line 6. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SFTP/Buffer.pm line 6. Compilation failed in require at C:/Perl/site/lib/Net/SFTP/Attributes.pm line 7. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SFTP/Attributes.pm line 7. Compilation failed in require at C:/Perl/site/lib/Net/SFTP.pm line 8. BEGIN failed--compilation aborted at C:/Perl/site/lib/Net/SFTP.pm line 8. Compilation failed in require at D:\PerlEx\perleg\NETSFTP\sftp.pl line 1. BEGIN failed--compilation aborted at D:\PerlEx\perleg\NETSFTP\sftp.pl line 1. regards Srinivasan.JS This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Win32::Shell::Execute Alternative
use Win32::API; sub ShellExecute { my $LS_File = shift; my $LS_Action = shift; my $ShellExecute = new Win32::API("shell32", "ShellExecuteA", ['N','P', 'P', 'P', 'P', 'I'], 'N'); if ($ShellExecute->Call(0, $LS_Action, $LS_File, 0, 0, 1)) { return 1; } else { return 0; } } *** REPLY SEPARATOR *** On 9/7/2004 at 5:28 PM Huub Peters wrote: >I've written a gui application with wxPerl and I want to be able to >execute >a (known) file from within the application (it's a list of files to be >attached to an e-mail) >So for example, when I attached a xls file (Excel) or an url I want to be >able to view it. Up till now I used the following to launch the accosiated >application: > >Win32::Shell::Execute("open", 'c:\test.xls', -1, -1, SW_SHOWNORMAL); >or >Win32::Shell::Execute("open", 'http://www.perl.com', -1, -1, >SW_SHOWNORMAL); > >This works fine on most systems but I recently found out that Windows NT >has >a problem with this. Only rarely does it execute (some url's) but most of >the time we get a visit from Dr.Watson claiming Explorer.exe performed an >illegal operation and crashes. The type of errors varies with what was >executed but the bottom line is that it fails on Win NT. > >I'm pretty sure there's an alternative way to accomplish the same thing and >was thinking along the lines of Win32::Process or something similar. > >I recently bought copies of 'Win32 Perl Scripting' and 'Win32 Perl >Programming' and think it should be in there somewhere but after wading >through a few chapters I thought maybe someone on the list has a >suggestion. > >Regards, > >Huub Peters > >___ >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: Win32::Shell::Execute Alternative
Huub Peters wrote: > I've written a gui application with wxPerl and I want to be able to execute > a (known) file from within the application (it's a list of files to be > attached to an e-mail) > So for example, when I attached a xls file (Excel) or an url I want to be > able to view it. Up till now I used the following to launch the accosiated > application: > > Win32::Shell::Execute("open", 'c:\test.xls', -1, -1, SW_SHOWNORMAL); > or > Win32::Shell::Execute("open", 'http://www.perl.com', -1, -1, SW_SHOWNORMAL); > > This works fine on most systems but I recently found out that Windows NT has > a problem with this. Only rarely does it execute (some url's) but most of > the time we get a visit from Dr.Watson claiming Explorer.exe performed an > illegal operation and crashes. The type of errors varies with what was > executed but the bottom line is that it fails on Win NT. > > I'm pretty sure there's an alternative way to accomplish the same thing and > was thinking along the lines of Win32::Process or something similar. > > I recently bought copies of 'Win32 Perl Scripting' and 'Win32 Perl > Programming' and think it should be in there somewhere but after wading > through a few chapters I thought maybe someone on the list has a suggestion. Have you tried just using the start command ? system "start c\\:test.xls"; -- ,-/- __ _ _ $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: scanf equivalent?
Take me off this list please!Submitted by: [EMAIL PROTECTED] One day at a time! Do you Yahoo!? Yahoo! Mail is new and improved - Check it out!___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: scanf equivalent?
Exactly what I need. Thanks! dave. At 21:47 2004-09-07, David D Miller wrote: >My problem is to read a hex value from a file and process it in binary. >For instance, I read a file containing data of the form 0x0b4f. Then I >need to mask/shift etc that data before displaying it. You probably want hex(). perl -e "print hex('0x0b4f')" perl -e "printf('%x', hex('0x0b4f'))" perldoc -f hex /J -- --- -- -- -- - - -- - Johan LindströmSourcerer @ Boss Casinos johanl AT DarSerMan.com Latest bookmark: "TCP Connection Passing" http://tcpcp.sourceforge.net/ dmoz: /Computers/Programming/Languages/JavaScript/ 12 ___ 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: scanf equivalent?
At 21:47 2004-09-07, David D Miller wrote: My problem is to read a hex value from a file and process it in binary. For instance, I read a file containing data of the form 0x0b4f. Then I need to mask/shift etc that data before displaying it. You probably want hex(). perl -e "print hex('0x0b4f')" perl -e "printf('%x', hex('0x0b4f'))" perldoc -f hex /J -- --- -- -- -- - - -- - Johan LindströmSourcerer @ Boss Casinos johanl AT DarSerMan.com Latest bookmark: "TCP Connection Passing" http://tcpcp.sourceforge.net/ dmoz: /Computers/Programming/Languages/JavaScript/ 12 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
scanf equivalent?
Experts: How do I do the equivalent of scanf in perl? My problem is to read a hex value from a file and process it in binary. For instance, I read a file containing data of the form 0x0b4f. Then I need to mask/shift etc that data before displaying it. dave. ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: passing hash to a function
jtownsen <[EMAIL PROTECTED]> wrote: : Typically I pass a string a variables to my functions. However, : as the list gets longer the script is harder to maintain. : Rather than a list, I thought I might pass the function a hash : (aka dictionary). I recall doing this when I took a Perl class, : but don't recall the details. : : Is it possible to pass the dictionary directly, e.g. : : some_function (%some_hash); : : Or do I need to pass the function a reference to the hash. : Please jog my memory. It can go either way. Reread the pass by reference section of 'perlsub' for details on passing by reference. Most of the modules I use pass hashes to new() as a hash, not as a reference. I tend to use a hash when the arguments are settings and individual data items and a hash reference when I'm working on a data structure. For example, print some_function( line_ending => "\n", separator => '|', ); print Q1_report( \%some_hash ); HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328 ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: passing hash to a function
> Is it possible to pass the dictionary directly, e.g. > > some_function (%some_hash); > > Or do I need to pass the function a reference to the hash. Please jog my > memory. It is possible: sub some_function { my %args = @_; ... } some_function (%some_hash); I think this will have an effect on efficiency, but if you don't care about that, this should work. Just make sure your documentation is clear as to which the function expects. -David ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
passing hash to a function
Typically I pass a string a variables to my functions. However, as the list gets longer the script is harder to maintain. Rather than a list, I thought I might pass the function a hash (aka dictionary). I recall doing this when I took a Perl class, but don't recall the details. Is it possible to pass the dictionary directly, e.g. some_function (%some_hash); Or do I need to pass the function a reference to the hash. Please jog my memory. Thanks ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
RE: Sending Emails Through Exchange 5.5 on NT4/5
If you can route the mail through the Exchange server's SMTP interface, then I am guessing you can use most of the modules you are used to.. Otherwise you are looking at writing a MAPI or Outlook script which is something new for you to learn, but by no means incredibly difficult (since there are lots of examples in the archives when searching for "Outlook.Application" (or searching on the same subject in Google). Steven -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ewen Marshall Sent: Monday, September 06, 2004 12:25 PM To: [EMAIL PROTECTED] Subject: Sending Emails Through Exchange 5.5 on NT4/5 Hi folks, Can any of you guys recommend any modules for sending emails through an MS Exchange 5.5 server. I'm writing a program that checks back up logs on 110 remote NT4/2000 servers and need to send an email with the results. All servers have access to the exchange servers. I've written many email programs using sendmail but never with exchange. All I need to do is create email, connect to the server and send it... nothing else! Anyone any ideas?? Thanks in advance for any help. Ewen ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Win32::Shell::Execute Alternative
I've written a gui application with wxPerl and I want to be able to execute a (known) file from within the application (it's a list of files to be attached to an e-mail) So for example, when I attached a xls file (Excel) or an url I want to be able to view it. Up till now I used the following to launch the accosiated application: Win32::Shell::Execute("open", 'c:\test.xls', -1, -1, SW_SHOWNORMAL); or Win32::Shell::Execute("open", 'http://www.perl.com', -1, -1, SW_SHOWNORMAL); This works fine on most systems but I recently found out that Windows NT has a problem with this. Only rarely does it execute (some url's) but most of the time we get a visit from Dr.Watson claiming Explorer.exe performed an illegal operation and crashes. The type of errors varies with what was executed but the bottom line is that it fails on Win NT. I'm pretty sure there's an alternative way to accomplish the same thing and was thinking along the lines of Win32::Process or something similar. I recently bought copies of 'Win32 Perl Scripting' and 'Win32 Perl Programming' and think it should be in there somewhere but after wading through a few chapters I thought maybe someone on the list has a suggestion. Regards, Huub Peters ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: Re: File::NCopy doesn't work with path/file names with spaces?
Making the changes inside ../lib/File/Ncopy.pm seemes to fix the problem while putting "use File::NCopy ':glob';" in the user code didn't. One thing interesting, though, is that putting the line in my script made a little bit of difference--files containing one ' (singe quote) in the file names were actually copied. Anyway, thanks. Richard Get your own "800" number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag On Tue, 07 Sep 2004, $Bill Luebkert ([EMAIL PROTECTED]) wrote: > Suresh Govindachar wrote: > > > $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]; > >> > >>Let us know if that helps. > >> > > > > Will putting -- in the user's code -- the line: > > > >use File::Glob ':glob'; > > > > before the line > > > >use File::Ncopy; > > > > result in File::Glob::glob being used inside File::Ncopy? > > Please try this too, and let us know. > > (Refer: Chapter 32/page 890 Camel book) > > I don't think so, but adding it in the module at 175 makes the change > at 508 unecessary - near aas I can tell. > > -- > ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] > (_/ / )// // DBE Collectibles Mailto:[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 > > ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Re: File::NCopy doesn't work with path/file names with spaces?
Suresh Govindachar wrote: > $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]; >> >>Let us know if that helps. >> > > Will putting -- in the user's code -- the line: > >use File::Glob ':glob'; > > before the line > >use File::Ncopy; > > result in File::Glob::glob being used inside File::Ncopy? > Please try this too, and let us know. > (Refer: Chapter 32/page 890 Camel book) I don't think so, but adding it in the module at 175 makes the change at 508 unecessary - near aas I can tell. -- ,-/- __ _ _ $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: File::NCopy doesn't work with path/file names with spaces?
$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]; > > Let us know if that helps. > Will putting -- in the user's code -- the line: use File::Glob ':glob'; before the line use File::Ncopy; result in File::Glob::glob being used inside File::Ncopy? Please try this too, and let us know. (Refer: Chapter 32/page 890 Camel book) Thanks, --Suresh ___ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs