Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
4 in place of undef: Uncaught exception from user code: No aliases!: Invalid argument at ./zz line 3. I must admit that the errors are shorter but the program still doesn't work!! Oh, hell!!! Thank you for any help, bnegrao. - Original Message - From: "Michael Kelly&

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
I'm on the 17 chapter of the book "Learning Perl second edition" and I'm stuck in this problem. (to open the /etc/aliases.db file for reading is an exercise of the chapter 17). If somebody there has a server runing Sendmail, you have the aliases.db file too. Moreover to simply so

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
I'm on the 17 chapter of the book "Learning Perl second edition" and I'm stuck in this problem. (to open the /etc/aliases.db file for reading is an exercise of the chapter 17). If somebody there has a server runing Sendmail, you have the aliases.db file too. Moreover to simply so

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
t open /etc/aliases.db file > Bruno Negrao - Perl List wrote: > > > Hi Michael, the problem is not with the "undef" value - undef is fine - > > if you read the dbmopen's documentation you could see it. > > > > If I choose a value like "0644"

Re: dbmopen can't open /etc/aliases.db file

2002-09-27 Thread Bruno Negrao - Perl List
CTED]> Sent: Friday, September 27, 2002 3:49 PM Subject: Re: dbmopen can't open /etc/aliases.db file > Bruno Negrao - Perl List wrote: > > > Ok david. > > > > Could you send me a code example of a database file being opened for > > reading with tie? > &

Re: autoftp

2002-09-27 Thread Bruno Negrao - Perl List
Yes. Exist the Net::FTP module. The following text comes from the Oreilly's book "Perl in a Nutshell" 16.2 Net::FTP Net::FTP is used to transfer files from remote hosts. Using Net::FTP, you can write simple FTP clients that transfer files from remote servers based on informatio

CGI simple but not working

2002-10-03 Thread Bruno Negrao - Perl List
Hi all, I'm studying the "Learning Perl Second Edition" and I'm learning cgi now. The book presents a sample cgi that doesn't produces the expected result as the book says it would. Could someone test it and say to me if there is something wrong? The following sc

Re: CGI simple but not working

2002-10-03 Thread Bruno Negrao - Perl List
this script should generate an one field form. But what appears in the screen are the strings inside the "q()" function. > What platform are you on, what version of perl are you using, etc? Redhat 6.2 perl version 5.005_03 built for i386-linux But i tested this script with RH7.2 v5.6.0

Re: CGI simple but not working - I discovered

2002-10-03 Thread Bruno Negrao - Perl List
Hi all, the problem is that the script is really erroneous. Where you read "q(..." should be "p( ..." The p() function is a part of the CGI.pm modules and stands for a new paragraph. the right script is: #!/usr/bin/perl -w # cgi-bin/ice_cream: program to answer *and

Re: Regular expression

2002-10-04 Thread Bruno Negrao - Perl List
> Hi Javeed , > > the last element of the array is $attt[$#attt]. If you have one line per > element, that should do it. Right. This is the easiest way. But, just to answer him, what he could do using regular expression could be something like: foreach (@attt) { /=/ && ( ($out) = (split (/=/))

Re: Regular expression

2002-10-07 Thread Bruno Negrao - Perl List
d of the blank spaces in the last line, add try this: foreach $line (@attt) { if ($line =~ /=/){ $out = $line ; $out =~ s/\s*//; print "$out"; } } I learnt all this from the O'reilly book "Learning Perl second edition". Tied hugs and warmfu

Installing Curses.pm on Red Hat 8.0

2003-04-03 Thread Bruno Negrao - Perl List
Hi, I tried to install the Curses.pm module on my redhat linux 8.0 but I didn't compile. Does someone did it successfully? Any trick? Thank you, - -- Bruno Negrão -- Suporte -- Plugway Acesso Internet Ltda. -- (31)34812311 -- bnegrao at plugway d

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

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 yo

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 everyth

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

Ntsendmail

2004-05-04 Thread PerlDiscuss - Perl Newsgroups and mailing lists
tarea of a HTML file. And the mean time, is it possible to redirect the user to another web page once the form is lauched. Here is the script: print "HTTP/1.0 200 OK\n"; print "Content-Type: text/html\n\n\n"; #! /usr/bin/perl -w $|=1; use NTsendmail; $ENV{"NTsendmail&quo

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] <h

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] <http://learn.perl.org/> <http://learn.perl.org/first-response>

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 startin

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|...|Cl

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) =

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 no

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

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 someon

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 f

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:

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

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

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

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: > > &g

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 hel

Re: Need help with script

2004-09-30 Thread PerlDiscuss - Perl Newsgroups and mailing lists
uoting rules and precedence in DOS > I guess. Here's what I did to make it work on my DOS command line: > C: > perl -l -00pe s/n/t/;s/"//g object.txt > I basically just removed the single-quotes from around the code in the > '-e' option. That gave me the outpu

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 ... &g

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]

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

how to read from more than one files at a time

2003-10-15 Thread PerlDiscuss - Perl Newsgroups and mailing lists
# Usage: perl jointfiles.pl infile1 infile2 outfile open (IN1, $ARGV[0]); open (IN2, $ARGV[1]); open (OUT, ">$ARGV[2]"); print "Input fileis : $ARGV[0], $ARGV[1]\n"; print "Output file: $ARGV[2]\n"; while() { chomp; $in1=$_; ; $in2=$_; printf OUT "

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

2003-10-16 Thread PerlDiscuss - Perl Newsgroups and mailing lists
> > 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? > > > >

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

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

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

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

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]

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]

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?

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

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]

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

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

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

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]

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
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&q

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

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

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

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 fo

<    2   3   4   5   6   7