RE: how do you install perl on windows 2000

2004-05-05 Thread Tim Johnson
Go to www.activestate.com and download ActivePerl. It is the de facto standard for Win32 Perl (closely followed by Cygwin). You will have a fully functional Perl install with the file associations already set up in a convenient MSI file. -Original Message- From: lino_i

RE: How do I append text to a text file - in the 3rd row ?

2004-05-05 Thread Charles K. Clarkson
Aviram, Shy <[EMAIL PROTECTED]> wrote: Please stop top-posting. : Matt, : : Thanks for your detailed answer. One question though: I : am not looking to replace line 3 but to "insert" : additional text starting from line 3. e.g.: [snip] : I am doing so from within a script and using a file ha

RE: starting perl

2004-05-05 Thread Charles K. Clarkson
Charlie davis <[EMAIL PROTECTED]> wrote: Please don't top-post Charles <[EMAIL PROTECTED]> wrote: : : > Charlie davis <[EMAIL PROTECTED]> wrote: : > : : > : What I was going by is a line of code in a book called : > : teacher yourself perl in 24 days. and all the book : > : said was to type in t

Re: starting perl

2004-05-05 Thread Charlie davis
That is what I keep getting told. But for some reason it will not work on my dos prompt. And what I entered before was copied and pasted into this newsgroup that is working for everyone else. I must have something wrong with the server that I am trying to us. I don't know what else it could be. Wh

RE: starting perl

2004-05-05 Thread Charles K. Clarkson
Charlie davis <[EMAIL PROTECTED]> wrote: : : What I was going by is a line of code in a book called : teacher yourself perl in 24 days. and all the book : said was to type in that line of code : c:\perl\bin\perl -w -e "print \"Hello, World!\n\";" : just like that into the command line. Is this wro

how do you install perl on windows 2000

2004-05-05 Thread lino_iozzo
Hello, I downloaded Perl 5.8 how do i get it to work on the windows environment? It appears to be quite confusing...please be as specific as possible. thanks, Lino

Re: Quick Perl on Windows Newbie Questions

2004-05-05 Thread JupiterHost.Net
Tim Johnson wrote: See answers below. Thanks Tim! -Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 12:30 PM To: [EMAIL PROTECTED] Subject: Quick Perl on Windows Newbie Questions Hello ActiveState ActivePerl users (any on this list?) :) I

Re: starting perl

2004-05-05 Thread Charlie davis
OK Thanks! Yes I did and the c:\perl\bin\ in the path. But correct me if I am wrong. What I was going by is a line of code in a book called teacher yourself perl in 24 days. and all the book said was to type in that line of code c:\perl\bin\perl -w -e "print \"Hello, World!\n\";" just like that

Re: Question about installing perl modules

2004-05-05 Thread Wiggins d Anconia
> I’ve got a RedHat 9 box with perl-5.8.0 and apache httpd-2.0.43 > installed, and I’m trying to install RT from bestpractical. To satisfy > the many perl dependencies, I’ve tried running perl > sbin/rt-test-dependencies --with-mysql --with-modperl2, which tells me > that I have the following u

Question about installing perl modules

2004-05-05 Thread Tim Huffman
I’ve got a RedHat 9 box with perl-5.8.0 and apache httpd-2.0.43 installed, and I’m trying to install RT from bestpractical. To satisfy the many perl dependencies, I’ve tried running perl sbin/rt-test-dependencies --with-mysql --with-modperl2, which tells me that I have the following unsatisfied

RE: Running two process simultaneously

2004-05-05 Thread Bob Showalter
[ stay on-list please, and bottom-post please ] William Black wrote: > I have two perl scripts that need to be run at the same time. > > x.pl > y.pl > > How is this done? You can use a shell to start them both: $ perl x.pl &; perl y.pl & Or, one can fork() and exec() the other: x.pl

Re: Removing characters from a string

2004-05-05 Thread James Edward Gray II
On May 5, 2004, at 2:32 PM, Charles K. Clarkson wrote: Hmmm. I wonder: $_ = q|It's a winner and shouldn't fail. Unless someone were prone to separating sentences with two spaces.|; print join ' ', grep { not /^[a-z]$/i } split; I imagine we could fix that: print join '', grep { not m/^[a-z]$/

RE: Running two process simultaneously

2004-05-05 Thread Bob Showalter
William Black wrote: > How can you run two processes Simultaneously in Perl? perldoc -f fork What are you trying to do? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Quick Perl on Windows Newbie Questions

2004-05-05 Thread Tim Johnson
See answers below. -Original Message- From: JupiterHost.Net [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 05, 2004 12:30 PM To: [EMAIL PROTECTED] Subject: Quick Perl on Windows Newbie Questions Hello ActiveState ActivePerl users (any on this list?) :) I have a couple quick questions

RE: Removing characters from a string

2004-05-05 Thread Charles K. Clarkson
Rob Dixon <[EMAIL PROTECTED]> wrote: : : >I tried all these substitutions. Unfortunately, : > they also destroy words in the string like can't, : > couldn't, what's, it's, and a multitude of others. : > Anyone with any solutions? : : Hi. : : A totally different solution: : : $_ = q(This i

re: Running two process simultaneously

2004-05-05 Thread William Black
How can you run two processes Simultaneously in Perl? William Black _ FREE pop-up blocking with the new MSN Toolbar – get it now! http://toolbar.msn.com/go/onm00200415ave/direct/01/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

Quick Perl on Windows Newbie Questions

2004-05-05 Thread JupiterHost.Net
Hello ActiveState ActivePerl users (any on this list?) :) I have a couple quick questions for you Windows users... Is ActivePerl automatically set to execute .pl files if doubleclicked? If not how do you set that up? To run it via DOS all you need to do is run "c:\> perl path\to\script.pl" correc

RE: [ Hash of Arrays]

2004-05-05 Thread Tim Johnson
Which brings up a good point. The OP should be using use strict; use warnings; As a prerequisite to submitting a post. Many times this will keep you from making these kinds of mistakes, and save the time of waiting for a response. -Original Message- From: JupiterHost.Net [mailto:[

Re: SEARCH & REPLACE

2004-05-05 Thread James Edward Gray II
On May 5, 2004, at 2:11 PM, Madhu Reddy wrote: Then code which i sent is inside subroutine.. Then at least drop all those crazy symbols: unless (open FH_SRC_SCRIPT $src_script) { print "Whatever"; return 0; } Isn't that easier on the eyes? James -- To unsubscribe, e-mail: [EMAIL PRO

RE: Problem changing the content of a file

2004-05-05 Thread Jose Alves de Castro
On Wed, 2004-05-05 at 15:40, Layani, Roger wrote: > when I open the file like : > open(RELFILE,">$file") || die ("error opening file \"$file\""); When you open the file to write to it, the file is cleaned (0 bytes). > .. > and print the change in sam efiel I get a 0 size file . > > @array =

Re: SEARCH & REPLACE

2004-05-05 Thread James Edward Gray II
On May 5, 2004, at 12:44 PM, Madhu Reddy wrote: James, Thanks for correction.. for u r question regarding file open, following is correct code if (!(open(FH_SRC_SCRIPT, $src_script))) { print "(TERADATA.pl) generate_script:: File $src_script open failed --> $!\n";

Re: SEARCH & REPLACE

2004-05-05 Thread Madhu Reddy
James, Thanks for correction.. for u r question regarding file open, following is correct code if (!(open(FH_SRC_SCRIPT, $src_script))) { print "(TERADATA.pl) generate_script:: File $src_script open failed --> $!\n"; return 0; } if (!(ope

RE: Problem changing the content of a file

2004-05-05 Thread Layani, Roger
when I open the file like : open(RELFILE,">$file") || die ("error opening file \"$file\""); .. and print the change in sam efiel I get a 0 size file . @array = ; while (@array) { chomp($_); $_=~ s/(#define SW_VERSION_MAJOR)(.*)/$1\t$major/; $_=~ s/(#define SW_VERSI

Re: Read From Socket

2004-05-05 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Roman Baeriswyl) writes: >Hey Guys > >I'm trying to read an answer from an SMTP server via socket. What are you trying to do that Net::SMTP won't do for you? Or Mail::Sender or Mail::Sender, for that matter? -- Peter Scott http://www.perldebugge

Re: SEARCH & REPLACE

2004-05-05 Thread James Edward Gray II
On May 5, 2004, at 12:26 PM, Madhu Reddy wrote: following is my main script, to simulate that i assigned to $_. Thanks for your solution if (!(open(FH_SRC_SCRIPT, "$src_script"))) { close(FH_SRC_SCRIPT); return 0; } Yuck. What does that say? If we ca

Re: SEARCH & REPLACE

2004-05-05 Thread Madhu Reddy
--- James Edward Gray II <[EMAIL PROTECTED]> wrote: > On May 5, 2004, at 11:03 AM, Madhu Reddy wrote: > > > -replace.pl--- > > #!/bin/perl -w > > > > # INPUT STRING > > my $in_str = ".import "; > > > > # REPLACE STRING > > my $repl = "/home/madhu/apps/toll.txt"; > > > > $_=$in

Re: Ntsendmail

2004-05-05 Thread Jenda Krynicky
Subject: Ntsendmail > I'm new to this and I'd like to know if anybody knows NTsendmail and Never heard of it. > how I can add variable that point to a textarea defined in a HTML > file? use CGI; my $CGI = new CGI; my $textarea = $CGI->param('TextareaName'); > I can run

RE: starting perl

2004-05-05 Thread Ned Cunningham
You have started a new thread? You should click reply all, and continue on with the same email in the future. I'm not sure if you are responding to whom? :-) Also, if one of the "Guru's" reads the second starting of the thread, he/she will not know what you are asking. The starting point of y

Best way to Send Hash to a Socket

2004-05-05 Thread JupiterHost.Net
Hello list, To day I am trying to figure out the best way to send a hash to a socket and have the receiver be able to use it as a hash. The best way I've done so far is to Data::Dumper the hash into a string and send the string, then parse the string back into a hash on the other end. So clien

starting perl

2004-05-05 Thread Charlie davis
Ok when I start the dos prompt I get this C:\WINDOWS\Desktop> I take it that is not what it should be?

Re: SEARCH & REPLACE

2004-05-05 Thread James Edward Gray II
On May 5, 2004, at 11:03 AM, Madhu Reddy wrote: -replace.pl--- #!/bin/perl -w # INPUT STRING my $in_str = ".import "; # REPLACE STRING my $repl = "/home/madhu/apps/toll.txt"; $_=$in_str; Why do this? # I don't want to use following, because # "TOLL_FREE" will be changed each tim

SEARCH & REPLACE

2004-05-05 Thread Madhu Reddy
-replace.pl--- #!/bin/perl -w # INPUT STRING my $in_str = ".import "; # REPLACE STRING my $repl = "/home/madhu/apps/toll.txt"; $_=$in_str; # I don't want to use following, because # "TOLL_FREE" will be changed each time #s//$repl/; # FOLLOWING WILL NOT WORK #s/_IFILE>

RE: starting perl

2004-05-05 Thread Ned Cunningham
It works Type in path at the prompt Look in it and make sure c:\perl\bin\ is in it ? If it isn't go to my computer and environment and add it. HTH Ned Cunningham POS Systems Development Monro Muffler Brake 200 Holleder Parkway Rochester, NY 14615 (585) 647-6400 ext. 310 [EMAIL PROTECTED] "T

starting perl

2004-05-05 Thread Charlie davis
This is the code c:\> \perl\bin\perl -w -e "print \ "Hello, World!\n\";" it is a one line code that is entered at the dos prompt and when I entered it all it dose is goes back to the dos prompt with nothing happening. I though that the the Hello World was going to popup on the screen.

DBI/DBD/Oracle Installation

2004-05-05 Thread Jeff Westman
Hi All , To install the DBI and DBD drivers for Oracle, I would want to install these in my $HOME directory. Does anyone know if these require a C/C++ compiler to install once I download from CPAN? The compiler here is HPUX and not gcc compliant. I'm just asking ahead of time hoping some

RE: Problem changing the content of a file

2004-05-05 Thread Wiggins d Anconia
Please bottom post > when I open the file like : > open(RELFILE,">$file") || die ("error opening file \"$file\""); > > .. > and print the change in sam efiel I get a 0 size file . > > @array = ; > while (@array) { > chomp($_); > $_=~ s/(#define SW_VERSION_MAJOR)(.*)

Re: Problem changing the content of a file

2004-05-05 Thread Wiggins d Anconia
Please don't cross post... > > The code: > sub mkrelease_dot_h{ > $devlabel = shift (@_); > $file = shift (@_); Why are these not lexically scoped (my'd)? > my ($major,$minor,$patch,$build) = ExtractRelease($devlabel); > my ($month,$day,$year) = GetCurrentDate(); > chomp($year); > > open(REL

Problem changing the content of a file

2004-05-05 Thread Aviram, Shy
The code: sub mkrelease_dot_h{ $devlabel = shift (@_); $file = shift (@_); my ($major,$minor,$patch,$build) = ExtractRelease($devlabel); my ($month,$day,$year) = GetCurrentDate(); chomp($year); open(RELFILE,"$file") || die ("error opening file \"$file\""); $string = "\"$major.$minor.$patch.$build

Re: Default tag problem

2004-05-05 Thread Wiggins d Anconia
> Hi all! > > Can someone pls explain the problem here : > > I am using MyModule.pm and the problem is coming as per i have explained > below > > > MyModule.pm > > package MyModule; > > use strict; > use Exporter; > use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); > > $VERSION

RE: How do I append text to a text file - in the 3rd row ?

2004-05-05 Thread Aviram, Shy
Matt, Thanks for your detailed answer. One question though: I am not looking to replace line 3 but to "insert" additional text starting from line 3. e.g.: textfile before: ** RELEASE NOTES ** Feature 1: blah blah blah

RE: How do I append text to a text file - in the 3rd row ?

2004-05-05 Thread Bob Showalter
Aviram, Shy wrote: > Hi, > > I have a text file I open and want to add new text into. However, I > want the new text to be at the 3rd row of the file (below the > headline) and not at the end. Use Tie::File. Super simple. http://search.cpan.org/~mjd/Tie-File-0.96/ -- To unsubscribe, e-mail: [E

RE: Simple DBI question

2004-05-05 Thread Bob Showalter
McMahon, Chris wrote: > Can anyone suggest DBI syntax to capture the result of > > SELECT DISTINCT column1 FROM table WHERE column2= -1 > > into an array? Just a hint would help... my @results = $dbh->selectcol_array('select ...'); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [ Hash of Arrays]

2004-05-05 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: No, I want to use Hash of Arrays. I want to define the hash in a better manner say something similar to the following way. my %ModelPath = { "2800" => [EMAIL PROTECTED], "4345" => [EMAIL PROTECTED] }

Re: package problem...

2004-05-05 Thread JupiterHost.Net
Cristi Ocolisan wrote: Hi everybody! Hello Cristi, [snip] My problem is that I can't make the script print the correct message into the webpage. Please tell me where I'm going wrong. This may not fix your immediate question but it will definately help you find it and save you headaches inthe fu

How do I append text to a text file - in the 3rd row ?

2004-05-05 Thread Aviram, Shy
Hi, I have a text file I open and want to add new text into. However, I want the new text to be at the 3rd row of the file (below the headline) and not at the end. Thanks, Shy

Default tag problem

2004-05-05 Thread anish mehta
Hi all! Can someone pls explain the problem here : I am using MyModule.pm and the problem is coming as per i have explained below MyModule.pm package MyModule; use strict; use Exporter; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); @

package problem...

2004-05-05 Thread Cristi Ocolisan
Hi everybody! I'm trying to build a script that will insert some things into a MySQL database. My problem starts when I want to send the correct message into a webpage. The webpage is in a package because I want to reuse it as a template. My problem is that I can't make the script pri

Re: pattern match question

2004-05-05 Thread Jose Alves de Castro
What are you using for printing? I'm thinking about print $& Care to paste some more of your code? :-) jac On Wed, 2004-05-05 at 11:23, Graeme McLaren wrote: > jac, thank you for your reply. I tried it and it didn't work, here is what > I have: > > if($line =~ /(?<=Retrieval command for )http

Re: pattern match question

2004-05-05 Thread Graeme McLaren
jac, thank you for your reply. I tried it and it didn't work, here is what I have: if($line =~ /(?<=Retrieval command for )http:.*?:/){ It prints off the "Retrieval command for" part as it did before :( any ideas? Cheers, Graeme :) From: Jose Alves de Castro <[EMAIL PROTECTED]> To: Graeme McLar

Re: pattern match question

2004-05-05 Thread Jose Alves de Castro
I would do /(?<=Retrieval command for )http:.*?:/ The "Retrieval" part now is contained in a "Look behind section", which is to mean it's not going to be stored as part of the match. I'm not sure what other cases you can get in that log file, but this solves the problem for that particular line

pattern match question

2004-05-05 Thread Graeme McLaren
Hi, I'm trying to build a regular expression. to match a URL from a logfile. In the logfile an example of the pattern I'm trying to match is: 12:12:1:http://10.2.203.1/missing1.html: Retrieval command for http://10.2.203.1/missing1.html: GET /missing1.html HTTP/1.0 so far I've got: =~ /^.*?Ret

RE: A cookie is not stored

2004-05-05 Thread B. Fongo
$returnpage = $ENV{HTTP_REFERER}; # Not all Browser send this value, so test to see whether $returnpage is defined. If not, then you may have to assign a value to it like: $returnpage = "origin.pl"; $cook_admin = $cgi_this->cookie(-name=>'admin', -value=>$value1); $cook_session = $cgi_this->c

Re: Simple DBI question

2004-05-05 Thread Ashish Srivastava
Hi Chris, Try this: #!/usr/bin/perl # Purpose: Perl script for testing Oracle Database Connection # First setenvironmental variable BEGIN { # Comment ORACLE_HOME variable if running on window $ENV{ORACLE_HOME} = '/usr/orasys/8.1.7'; $ENV{TWO_TASK}= 'mydbname'; } use strict;

RE: Simple DBI question

2004-05-05 Thread B. Fongo
Assuming you've established a connection... @result = $dbh->selectrow_array("SELECT DISTINCT column1 FROM table WHERE column2= -1"); $dbh->disconnect; This should do... Babs ||> -Original Message- ||> From: McMahon, Chris [mailto:[EMAIL PROTECTED] ||> Sent: Wednesday, May 05, 2004 12:4

RE: How do i call a module !

2004-05-05 Thread B. Fongo
Read the docs of the module or the source to find out which functions it exports by default, and which you have to import explicitly. So if a module is Bar::Foo and exports 2 functions (fistfunc, secondfunc), then you can use them by Saying: Use Bar::Foo; Firstfunc(); # Referring to the first f

Simple DBI question

2004-05-05 Thread McMahon, Chris
Hello... My first DBI script was simply an inventory of columns in tables. Now I'm struggling with my second DBI script, and finding the CPAN docs tough going. Can anyone suggest DBI syntax to capture the result of SELECT DISTINCT column1 FROM table WHERE column2= -1

Re: Removing characters from a string

2004-05-05 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > In a message dated 5/4/04 5:19:49 PM Eastern Daylight Time, Jimstone77 > writes: > > > > In a message dated 5/4/04 4:14:58 PM Eastern Daylight Time, > > [EMAIL PROTECTED] writes: > > > > > > >> : > >> > >> > > >> > How would I remove any and "only" single characters fro