Re: Perl module question

2004-12-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Stephen Liu wrote: > Further to my last posting > $ perl wget_window.pl > Can't locate Tk.pm in @INC (@INC contains: > Tk.pm module still could not be found It can't be found because it didn't install: > t/zzScrolled.FAILED tests 66, 94 ... > /usr/bin/make test -- NOT OK >

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
> Hi again, > Ok, I've got ActiveState on WinXP, 5.8.4 ... I tried and found that I > had the same problems as you. After much playing around, I found it's > a quoting problem on the command line (at least, in my case it was). > I just don't have a good grasp of quoting rules and precedence in D

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I am using Cygwin on Win2K and the version of perl on it is v5.8.0 I am using the same input file, but when I run the command you ran, the output looks like Object1 Description1 Object2 Description2 Object3 Description3 Thanks Errin Larsen wrote: > > Thanks for your help guys... > > > >

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Paul Johnson wrote: > On Thu, Sep 30, 2004 at 08:00:41AM -0500, Errin Larsen wrote: > > Hi Perlers, > > On 30 Sep 2004 10:11:29 +0100, Jose Alves de Castro > > <[EMAIL PROTECTED]> wrote: > > > On Wed, 2004-09-29 at 21:25, JupiterHost.Net wrote: > > > > perl -l -00pe's/n/t/;s/"//g;' FILENAME >

Need help with script

2004-09-29 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I have a file with the following format Object1 "Description1" Object2 "Description" Object3 "Description" I would like the output in the following format object1<...tab>Description1 object2<...tab>Description2 object3<...tab>Description3 Thanks -- To unsubscribe, e-mail: [EMAIL

Reading hex data from file.

2004-08-18 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, Among other data, a binary file contains the bytes "00A5". I am trying to read these four bytes and get the decimal equivalent as follows: .. $buf; $hex_val; $dec_val; read(FD, $buf, 4); $buf -> "00A5" $hex_val = unpack("H*", $buf); $dec_val = hex($hex_val); ... Is there a way in wh

Modifying @INC

2004-07-29 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I want to add some paths to the @INC array to resolve certain package names at runtime. One of the methods is: "push(@INC,$path) or unshift($path,@INC)" and then say "require package_name;". the problem with this is that we still need to use the "::" operator with the symbols to resolve the packag

Rounding a negative number

2004-07-22 Thread PerlDiscuss - Perl Newsgroups and mailing lists
$item = sprintf("%0.2f", $item); print $item, "\n"; The above code prints -992.99 if $item = -993, while it prints 993.00, if $item = 993. Why is the rounded number off by 0.01 if the number is negative? Thanks, SU -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

different argv behavior in different machines

2004-06-24 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I am a new perl user and I am running into a problem. I am trying to use argv and it's not returning the correct response on my laptop, but it's working fine on another machine. The only difference between the two machines is that on my laptop, I first installed the perl AS package for windows ra

Importing external data into arrays

2004-06-09 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I'm just a beginner to perl and am having some beginner type problems. I need to import a external file containing 15 character ID numbers (one per record) into an single dimensional array within perl. Later this array will be used to interrogate other data within the program. Can someone out the

How to readline when using "more" option in script.

2004-06-08 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I could use open(STDOUT,"| more") option to more big file. After this, I close STDOUT as if I do not close, readline prints the prompt even when more is not 100%. ### open(STDOUT,"| more") || "Cannot open stdout for more $!"; $status = system("cat report.tx

How to readline when using "more" option in script.

2004-06-08 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I could use open(STDOUT,"| more") option to more big file. After this, I close STDOUT as if I do not close, readline prints the prompt even when more is not 100%. ### open(STDOUT,"| more") || "Cannot open stdout for more $!"; $status = system("cat report.tx

Calling "more" in perl script for large files.

2004-06-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi There, Any pointers to how to call "more" on a file in perl script. I am writing one script which displays one report to user and then asks some inputs. User need to see complete file. To solve this, I thought I can call `more in the script and continue. But looks loke it is not possible. Any

Extract text between tags

2004-06-02 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I want the extract the text in between the tags from my htm file. I am using below code its not working Please let me know how to proceed further. use Text::Balanced "gen_extract_tagged"; my @queries = ( qq(QUERY = sdf) ); for (@queries) { my ($extracted, $remainder, $prefix) =

Loading Scalar Vars with Text - Readability

2004-06-01 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, Adding Perl to the list of languages... and came across a question of loading vars with very long strings... Actually I am modifiying a prior employee's code and want to make it more readable. currently the code is such: my $longlist = "Clause1|Clause2|Clause3|Clause4|...|ClauseN"; I

Digest:MD5 compilation errors...

2004-05-25 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I'm trying to install Digest:MD5 2.33 on RHES 3 and getting compilation errors: perl Makefile.PL Perl's config says that U32 access must be aligned. Writing Makefile for Digest::MD5 make Makefile:85: *** missing separator. Stop. Here's a snippet of the Makefile starting with line #85: installma

How do you invoke a Clearcase View?

2004-05-20 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Does anyone know how to call a Clearcase setview from Perl, where you can change directories and move around the vob, and compile files? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

File Monitoring

2004-05-10 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi there, Can anyone recommend a good way to have a perl script that constantly monitors for the creation of new files on UNIX and launches another process? Thanks! Cheers, Ben -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Ntsendmail

2004-05-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I'm new to this and I'd like to know if anybody knows NTsendmail and how I can add variable that point to a textarea defined in a HTML file? I can run it now but it shows the example text defined in my pl script file. I'd like to replace that message with the content of a textarea of a HTML fi

Re: installing perl module without root permission

2004-04-09 Thread PerlDiscuss - Perl Newsgroups and mailing lists
take a look at http://www.rcbowen.com/imho/perl/modules.html. Specifically he/she writes: If you do not have root permissions on the machine where you want to install the module, such as if you wish to install a module in your home directory, just change one of those commands. Instead of

installing perl module for mysql driver

2004-04-09 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Im trying to install the module DBD::mysql so I can connect to a mysql database from a perl script. The instructions for installing told me to run the command: perl -MCPAN -e 'install Bundle::DBD::mysql' this did its thing, downloaded and unzipped some gz gfiles, etc. Then said everything was ok

Re: PERL concatenating directory names

2004-03-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I'm on a Windows 2000 environment - and yes, I agree that using the PERL conventions would be best. Unfortunately, there is a specific request for this command to be used in this basic format. I've used the command in a shell script (.sh) and it works fine, but no luck in PERL. If you have any m

PERL concatenating directory names

2004-03-03 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I'm having a problem when redirecting output from a system call to a text file. A good example would be: command.com /c dir /O /a-d /s > dir.txt When I run this directly from the command line I will get the full path structure in the output file. When I call this from a perl script in the form:

Capture/Display a program's output in an ASP page

2004-02-27 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I would like to Capture/Display a program's output in an ASP page. Here's the program:(TestProg.pl) --- print "This line came from my test perl program"; Here is ASP to excute the program that some nice person on this Newgroup gave me. It executes

Perl on WinCE

2004-02-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, This is with regard to deploying Perl on Windows CE. My hardware setup consists of an Intel Celeron Processor, an i830M4 chipset Intel motherboard and I am running WindowsCE .Net 4.2 here. The board is targeted at Notebook devices. This is acting as my Windows CE device while I am using a

New Perl User needs help with POST in perl

2004-01-29 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I have written my HTML code to where it uses POST to collect information. Where do I start to write a script that collects the data from the web site, places the input into a dbm file, then places a 1 next to it like an array? Some of the data in the file will have zeros, while the ones that are in

Re: How to call perl programs from ASP page

2004-01-26 Thread PerlDiscuss - Perl Newsgroups and mailing lists
This is what that gets me: Error Type: PerlScript Error (0x80004005) Global symbol "$Server" requires explicit package name > Sounds like perl is not starting automatically. Try this: > my $file_path = $Server->MapPath( "/ASPtoPerl/MakeFile.pl" ); > my $exit_status = system_call

Re: How to call perl programs from ASP page

2004-01-26 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi Charles Still no luck... I tried: system_call_test( 'C:\Inetpub\wwwroot\ASPtoPerl\MakeFile.pl') system_call_test( 'C:/Inetpub/wwwroot/ASPtoPerl/MakeFile.pl') I even moved the File to the "scripts" folder and tried: system_call_test( 'C:\Inetpub\Scripts\MakeFile.pl') Any more ideas ? Thanks f

Re: How to call perl programs from ASP page

2004-01-26 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hey Charles, This is what your script returned Executing this: 'MakeFile.pl' 'system' returned: 'No such file or directory' What's the next step ? Pete -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How to call perl programs from ASP page

2004-01-25 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I'm new to Perl and I'm trying to excute/call a perl program from Perl Script in an ASP page. I've loaded ActivePerl v5.6 on my Microsoft Win2000 webserver and I can execute lots of Perl code in my ASP pages with no problem, but I need to call an external program and don't know the correct syst

IO File Problems

2004-01-21 Thread PerlDiscuss - Perl Newsgroups and mailing lists
hi there, couse of my missing skills with filehandling i would be happy if you provide me help. this is my problem: 1) I´m getting a list of email adresses (strings) from a database into an array - o.k. no problem ... 2) now i have to merge this strings with strings from a file. in this file th

IO File Problems

2004-01-21 Thread PerlDiscuss - Perl Newsgroups and mailing lists
hi there, couse of my missing skills with filehandling i would be happy if you provide me help. this is my problem: 1) I´m getting a list of email adresses (strings) from a database into an array - o.k. no problem ... 2) now i have to merge this strings with strings from a file. in this file th

CGI: Premature end of script headers

2004-01-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I've installed AM Lite on an HP-UX 11.0 system running Apache 2 with PERL 5.8.0. When accessing http://root/cgi-bin/amadmin.pl, I get the following error: Server error! Error message: Premature end of script headers: /opt/apache2/lib/htdocs/cgi-bin/amadmin.pl If you think this is a server error, p

How to parse Microsoft Outlook Inbox

2004-01-06 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I am trying to write a script that will parse Microsoft outlook Inbox to a .txt file. Please let me know if there a way to do that. Thanks in advance for your help. Ron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl module installation problem

2003-12-22 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Dear Sir/Madam, I am just wondering if anyone can help with this: When I try to install the module, XML::Parser::PerlSAX, I encountered the following error message: Running make test PERL_DL_NONLAZY=1 /usr/bin/perl5.8.1 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bli

Line by line

2003-12-17 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I have a file extremely large in size and length. I want to read the file line by line and worry about matching up each line and running that line through a subroutine instead of opening the entire file (which would take a while). So how do I open a file up and process each line individually?

I am having trouble getting win32::guitest calls. To be recognized by gaming app

2003-12-12 Thread PerlDiscuss - Perl Newsgroups and mailing lists
The button clicks in win32::guitest::SendKeys({LEFT}); left arrow actually to be recoginized by the game app. Any ideas. Some keys get recognized but other keys dont. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Calling a program in win32 with spaces in the path to the .exe

2003-12-02 Thread PerlDiscuss - Perl Newsgroups and mailing lists
How do you handle spaces in a system call to an .exe @args = (C:/Program Files/Total War/Medieval - Total War/Medieval_TW.exe"); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Can't locate object method "get" via package "LWP::UserAgent"

2003-11-24 Thread PerlDiscuss - Perl Newsgroups and mailing lists
#!/usr/bin/perl use strict; use URI; #use HTTP::Request::Common qw(GET); use LWP; #use HTTP::Response; my $browser = LWP::UserAgent->new; $browser->env_proxy(); my $response=$browser->get('http://finance.yahoo.com/d/quotes.csv?s=msft&f=sl1d1t1c1ohgv'); print $response->content; Can someone plea

Can't not locate object method "isadmin" via package "Noc1"

2003-11-13 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hello all, I just added a new method called isadmin to existing and working module Noc1.pm And use this new added method in my index.html like this use Noc1; my $noc = new noc1; my public = noc->ispublic(); my $admin = noc->isadmin(); if ($admin) { blah blah blah} When i tried to access ind

logging

2003-10-28 Thread PerlDiscuss - Perl Newsgroups and mailing lists
My co-worker wrote a perl script on a WIN 2000 Advance server that monitors my E10K 8 Unix domains. It executes every 15 minutes and then the output attempts are logged in the /var/adm/messages on my unix domains each time. How do I redirect this output to another log of its own to keep it from fil

Tokens??

2003-10-20 Thread PerlDiscuss - Perl Newsgroups and mailing lists
HI, I am brand new to Perl and I am trying to modify a script that someone else wrote. I have this line where primaryntaccount = something like this domainname\userid Token=primaryntaccount:: %ntaccount% = (\\w+).*$ I want to pass a different value for primaryntaccount which I am getting by th

Re: how to read from more than one files at a time

2003-10-16 Thread PerlDiscuss - Perl Newsgroups and mailing lists
thanks John and Rob for the great enlightenment, they taught me a lot. I wonder why the following is wrong: while (($in1=) && ($in2=)) { .. } Ben Rob Dixon wrote: > <[EMAIL PROTECTED]> wrote: > > > > I need to read from more than one file at a time and do some > > operation on the strings an

how to read from more than one files at a time

2003-10-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi, I need to read from more than one file at a time and do some operation on the strings and join them together, and put into one output file. Here is the code. But I noticed the second file never get read. It must be sth very simple to overcome this. Can anyone give me a hint? thanks, Ben # U

Filter::Decrypt2

2003-10-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
This is perl, v5.6.1 built for i386-linux This is the file: #!/usr/bin/perl use Filter::decrypt2 ; ÿa8HS#5"W5ybnuFE*]S+ ... and a bunch more garble ... This is the output: "bad encryption format at /usr/bin/client_tools line 3." This is what I did: Not much. Basically just looked for the dec

Searchable Perl Newsgroups

2003-10-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Are these newsgroups searchable from anywhere ??? Thanks for the help! -John -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Inplace file editing with <> operator

2003-09-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
I know how it's supposed to be done but when i tried it in a program i'm working on at the moment it isn't working quite how i expected. The program is, in it's simplest form (which still doesn't work): -- #!perl for $file () { push @ARG