Re: CGI POST Arguments

2001-08-30 Thread Curtis Poe
--- Brad Allen <[EMAIL PROTECTED]> wrote: > I'm setting up a new web server to move some existing sites, that > include perl scripts. > > I definitely have perl running as a CGI (vs. mod_perl) and the script > I'm working with is a slightly modified version of FormMail from Matt's > Script Arc

pipeing files to a script

2001-08-30 Thread Javier Bellido
Hi, friends! I'd like to process e-mails with a script. I use getmail to fetch the mail in a pop3 account and I can filter messages and send them to my script using the pipe "|" but I don't know how make a script process a file. Can you give me some clue? Something like: messages from [EMAIL P

small clarification

2001-08-30 Thread Rajanikanth Dandamudi
Hello, I had a small doubt. I don't whether it is a reasonable or unreasonable doubt, but I want to get it clarified. What is the reason behind not having a builtin function(something similar to join, grep, chomp) in perl to find the current working directory. I am

CGI POST Arguments

2001-08-30 Thread Brad Allen
I'm setting up a new web server to move some existing sites, that include perl scripts. I definitely have perl running as a CGI (vs. mod_perl) and the script I'm working with is a slightly modified version of FormMail from Matt's Script Archive available at; http://www.worldwidemart.com/scr

Re: Date_to_Text Problem

2001-08-30 Thread Curtis Poe
--- Clinton <[EMAIL PROTECTED]> wrote: > I have separated Year, Month and Day so I can feed into the Date_to_Text > function from Calc. > > $firstdate = $dates[1]; > $firstdate =~m/(\d*)-0?(\d*)-0?(\d*)/g; > my $year = $1; > my $month = $2; > my $day = $3; > > If I print $firstdate it correctly

Date_to_Text Problem

2001-08-30 Thread Clinton
I have separated Year, Month and Day so I can feed into the Date_to_Text function from Calc. $firstdate = $dates[1]; $firstdate =~m/(\d*)-0?(\d*)-0?(\d*)/g; my $year = $1; my $month = $2; my $day = $3; If I print $firstdate it correctly prints 2001-07-16 00:00:00 However my $firstcalc = Date_to_

Re: The angle operator and really big files

2001-08-30 Thread smoot
> Doug Lentz <[EMAIL PROTECTED]> said: > I've been using to read an entire text file into an array. > > @buffer = ; > > I string-manipulate the individual array elements and then sometime > later, do a > > $buffer = join "", @buffer; > > ...and this worked OK for a 80M text file. I couldn't

RE: checking file date/time

2001-08-30 Thread Gibbs Tanton - tgibbs
perldoc -f -M -M $filename will tell you the age of the file in days. -Original Message- From: Rory O'Connor To: [EMAIL PROTECTED] Sent: 8/30/2001 7:17 PM Subject: checking file date/time Can anyone help me with - or point me to a resource - about checking file date/time with perl? I n

checking file date/time

2001-08-30 Thread Rory O'Connor
Can anyone help me with - or point me to a resource - about checking file date/time with perl? I need to write a small script that i can run with cron and will e-mail me if a particular file is older than 2 days. The file in question is supposed to be refreshed daily but sometimes our linkage br

Re: ignoring case when comparing two vars

2001-08-30 Thread Brett W. McCoy
On Thu, 30 Aug 2001, Rory O'Connor wrote: > I am comapring e-mail addesses in this fashion: > > if ($email eq $name_list[10]) { whatever } > > but i just realized that the email address can be the same but the case > different and it won't match. How can I ignore the case for the purpose > of co

ActiveState and PPM

2001-08-30 Thread bentwingedbird
I'm currently trying to install a module for ActiveState Perl. I'm running W2K. I've attempted to use PPM, but am having little success so far. I've set the environment variable for my proxy server, and have no problem starting PPM. But I get no results when I do a search, and every attempt to

Re: ignoring case when comparing two vars

2001-08-30 Thread Wagner-David
Could wrap it in either a uc or lc like lc($email) eq lc($name_list[10]) or uc or use reg like $email=~ /^$name_list[10]$/i Wags ;) -Original Message- From: Rory O'Connor [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 14:59 To: [EMAIL PROTECTED] Subj

ignoring case when comparing two vars

2001-08-30 Thread Rory O'Connor
I am comapring e-mail addesses in this fashion: if ($email eq $name_list[10]) { whatever } but i just realized that the email address can be the same but the case different and it won't match. How can I ignore the case for the purpose of comparison? Thanks! providing the finest in midget tech

Re: The angle operator and really big files

2001-08-30 Thread Peter Scott
At 05:56 PM 8/30/01 -0400, Doug Lentz wrote: >I've been using to read an entire text file into an array. > >@buffer = ; > >I string-manipulate the individual array elements and then sometime >later, do a > >$buffer = join "", @buffer; > >...and this worked OK for a 80M text file. I couldn't resis

The angle operator and really big files

2001-08-30 Thread Doug Lentz
I've been using to read an entire text file into an array. @buffer = ; I string-manipulate the individual array elements and then sometime later, do a $buffer = join "", @buffer; ...and this worked OK for a 80M text file. I couldn't resist and tried it out on a gigabyte monster. The script a

data type conversion - Overflow?

2001-08-30 Thread Scott Taylor
Can someone please point out what I am doing wrong here? I get this error: DBD::InterBase::st fetchrow failed: Overflow occurred during data type conversion. -conversion error from string "0" when trying to do this (connection and all else is OK): $SQL = "SELECT B, TRKID, TRLID, HAULID, DESCRIP

RE: Confusion with Regular Expressions

2001-08-30 Thread Chris Rogers
Thanks... Chris -Original Message- From: Carl Rogers [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 5:12 PM To: Chris Rogers; '[EMAIL PROTECTED]' Subject: RE: Confusion with Regular Expressions >There must be a way of >defining a character class using the ascii values inst

RE: Confusion with Regular Expressions

2001-08-30 Thread Carl Rogers
>There must be a way of >defining a character class using the ascii values instead of the actual >character. I just don't know how to do it. If you refer to the ASCII value in it's hexadecimal equivalent (i.e.: 'A-Z ' is equivalent to [\x41-\x5A]) that should do the trick. HTH Carl -- To un

RE: Confusion with Regular Expressions

2001-08-30 Thread Chris Rogers
THANK YOU! THANK YOU! THANK YOU! That did the trick. I didn't think about that as a possibility. I have another question now. How would I go about defining ascii characters that are not on my keyboard in the character class? There must be a way of defining a character class using the ascii v

RE: Confusion with Regular Expressions

2001-08-30 Thread Bob Showalter
> -Original Message- > From: Chris Rogers [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 30, 2001 4:38 PM > To: Beginners@Perl. Org (E-mail) > Subject: RE: Confusion with Regular Expressions > > > OK. I have tried so many but haven't kept very good track of them. > > Original st

RE: Confusion with Regular Expressions

2001-08-30 Thread Chris Rogers
Thanks, but that didn't catch the string. I'll keep on trying -Original Message- From: Gibbs Tanton - tgibbs [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 4:41 PM To: 'Chris Rogers '; 'Beginners@Perl. Org (E-mail) ' Subject: RE: Confusion with Regular Expressions $line = g

RE: Confusion with Regular Expressions

2001-08-30 Thread Chris Rogers
OK. I have tried so many but haven't kept very good track of them. Original string: ("APPLICATION" "MSWORD" ("name" Liste des numéros de téléphone.doc) NIL NIL "BASE64" 61658 NIL ("attachment" ("filename" Liste des numéros de téléphone.doc)) NIL) I need to surround the Liste des numéros de té

RE: Confusion with Regular Expressions

2001-08-30 Thread Gibbs Tanton - tgibbs
$line = get_line(); # or whatever $line =~ /"\s[^" ()]+[)]/; The " at the beginning will match to a quote followed by a space (\s). Then we match any character not in the character class [" ()] (by prepending it with ^. Finally, we match the literal ) [)]. This is what you described...I don't

RE: Confusion with Regular Expressions

2001-08-30 Thread Chris Rogers
OK. I have tried so many but haven't kept very good track of them. Original string: ("APPLICATION" "MSWORD" ("name" Liste des numéros de téléphone.doc) NIL NIL "BASE64" 61658 NIL ("attachment" ("filename" Liste des numéros de téléphone.doc)) NIL) I need to surround the Liste des numéros de té

Re: Confusion with Regular Expressions

2001-08-30 Thread Brett W. McCoy
> should be enclosed in quotes. Chapter 5 in the Camel book has again > completely confused me and I have tried many different regex's to accomplish > this over the last two days but have had very little luck. Any help would > be greatly appreciated. How about posting what you have tried so far

Confusion with Regular Expressions

2001-08-30 Thread Chris Rogers
While regular expressions are one of the most powerful aspects of Perl, they are probably my weakest point. I have a string that is quite irregular and am trying to fix it using a regex. What I need to do is find a substring that begins with a quote then a space then any characters (not includin

Attempt to Install DBI

2001-08-30 Thread Bockhoven, Pamala
Hello: After I successfully installed ActiveState's Perl 5.6.1 on a Windows 98 platform, I downloaded DBI-1.20.tar.gz from Symbolstone. I unzipped it and attempted to install several different ways with the following results: 1. Using ActiveState's PPM, I typed "install DBI" (and DBI-1.20.tar,

Re: On error goto?

2001-08-30 Thread Peter Scott
At 10:55 AM 8/30/01 +0200, Edwin Günthner wrote: >Hi there, > >In BASIC you have "on error goto", in REXX you >can write "SIGNAL ON ERROR". >I am wondering if there is a similiar feature in Perl ... There are various features and modules that can combine to give you this capability (and a lot mo

RE: Validate a date

2001-08-30 Thread Ron Rohrssen
Thanks Tanton. I'd never seen that before. Ron -Original Message- From: Gibbs Tanton - tgibbs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 29, 2001 8:06 AM To: 'Ron Rohrssen '; 'Perl Beginners ' Subject: RE: Validate a date There are probably modules on CPAN that will do that, th

Weekly list FAQ posting

2001-08-30 Thread casey
NAME beginners-faq - FAQ for the beginners mailing list 1 - Administriva 1.1 - I'm not subscribed - how do I subscribe? Send mail to <[EMAIL PROTECTED]> You can also specify your subscription email address by sending email to (assuming [EMAIL PROTECTED] is your email address)

RE: Validate a date

2001-08-30 Thread Gibbs Tanton - tgibbs
There are probably modules on CPAN that will do that, there are a gazillion of Date modules. However, one option is to just wrap the $RptDate statement in an eval... eval { $RptDate = UnixDate($strDate, "%m/%d/%y"); } now $@ should be the error result. -Original Message- From: Ron Ro

Re: Doubt

2001-08-30 Thread Brett W. McCoy
On Thu, 30 Aug 2001, Rajanikanth Dandamudi wrote: >My doubt is "How do you identify whether a perl scalar variable >contains a numeric value or alphanumeric string?" . I had gone >through theexplanation available atthe URL >http://www.cpan.org/doc

RE: Doubt

2001-08-30 Thread John Edwards
Sorry, hit the send button early :) Ignore that mail... -Original Message- From: John Edwards Sent: 30 August 2001 16:52 To: 'Rajanikanth Dandamudi'; '[EMAIL PROTECTED]' Subject: RE: Doubt It doesn't matter to Perl if you store alphanumerics or numbers or both in scalar. When you wan

RE: Doubt

2001-08-30 Thread John Edwards
It doesn't matter to Perl if you store alphanumerics or numbers or both in scalar. When you want to perform a numeric function on the scalar, Perl treats the data in it as numeric. When you want to perform an alphanumeric on it, it treats the data as alphanumerics. e.g $data = "one"; $new = "$da

Doubt

2001-08-30 Thread Rajanikanth Dandamudi
Hello, My doubt is "How do you identify whether a perl scalar variable contains a numeric value or alphanumeric string?" . I had gone through theexplanation available atthe URL http://www.cpan.org/doc/FMTEYEWTK/is_numeric.html , but I didn't und

Re:Open an editor

2001-08-30 Thread Jorge Goncalvez
Hi, I would like to open an editor (ex: notepad) to display the entire contains of the file c:\cygwin\etc\dhcpd\dhcpd.conf when A user presses an icon. How can I do this in Perl TK? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Help Me

2001-08-30 Thread smoot
> John Edwards <[EMAIL PROTECTED]> said: > You don't mention which one you are having problems with. > > First off though, you should change > > $custdir="/uhome/cachet/temp/temp1/cust/"; > > to > > $custdir="/uhome/cachet/temp/temp1/cust"; > > as you are adding the trailing slash when you

RE: where is croak coming from?

2001-08-30 Thread Bob Showalter
> -Original Message- > From: Edwin Günthner [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 30, 2001 9:53 AM > To: [EMAIL PROTECTED] > Subject: where is croak coming from? > > > Hi there, > > I am just wondering in one of the many man pages I can > find out something about the croak

where is croak coming from?

2001-08-30 Thread Edwin Günthner
Hi there, I am just wondering in one of the many man pages I can find out something about the croak function? I thougt: well, must be something built in like chop, chomp or so - but no, there is nothing in perlfunc about croak ... btw: same for BEGIN, END, CHECK. Where are those magical words d

Re: removing spaces from the end of a string WITHOUT a REGEX

2001-08-30 Thread Edwin Günthner
Why not using chomp instead? from perlfunc: "This safer version of chop removes any trailing string that corresponds to the current value of $/ ..." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: removing spaces from the end of a string WITHOUT a REGEX

2001-08-30 Thread John Edwards
Well, I think a regex is your best bet. --- $data = 'This is a very long string '; $data =~ s/\s+$//; --- That will trim all trailing spaces. Without a regex you could try something like --- $data = 'This is a very long string '; do { $_ = $data; $test = chop; cho

removing spaces from the end of a string WITHOUT a REGEX

2001-08-30 Thread Hamish Whittal
Hi all, I have a string I want to remove spaces from but without the use of a regex. e.g. 'This is a very long string ', I want to store as 'This is a very long string' Notice the removal of 4 spaces at the end. The number of spaces at the end is variable. If I have to use a regex I will, but t

regular expresions.

2001-08-30 Thread agc
ok so checking the regexp at perldoc, and trying toundertand this ioen I geot for while ($buffer !~ /\s\.\./) ; may be soeting like while buffer is not containnig spaces followed by 2 dots then do what follows, ok for while ($buffer !~/here is the pattern list|list/) may be something like whi

On error goto?

2001-08-30 Thread Edwin=20G=FCnthner
Hi there, In BASIC you have "on error goto", in REXX you can write "SIGNAL ON ERROR". I am wondering if there is a similiar feature in Perl ... thx, edwin günthner ___ 1.000.000 DM gewinnen - kostenlos tippen - http://millionen

RE: Help Me

2001-08-30 Thread John Edwards
You don't mention which one you are having problems with. First off though, you should change $custdir="/uhome/cachet/temp/temp1/cust/"; to $custdir="/uhome/cachet/temp/temp1/cust"; as you are adding the trailing slash when you open the file. open (CHAN, "<$custdir/mail.txt")