STDIN question

2003-03-03 Thread David Gerler
Hello all,

I have a script that I have been working on with perl builder and win2000. I have it 
working correctly at this point on the win 2000 machine. Although, I am not finished, 
I wanted to do a test on the server at this point to make sure everything is working 
correctly... That is where my problem begins...

in my script I have a subroutine that begins with this line... 

my @stuff = split(//,STDIN);

As I said, it works on win 2000 but when I upload it to the server (linux) it fails to 
carry through the variables. I have narrowed the problem down to this line by 
injecting good values into the variables after this line and the values carry through 
without a problem.

Does that line get treated differently on a linux machine as opposed to a win32 
machine?

Any help that anyone provides will be appreciated.

Dave Gerler

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: STDIN question

2003-03-03 Thread David Gerler
Thanks to all for the replies.

The purpose of the line was to parse an input from a form. I could
explain my reasons for using that method.. but every time I have tried
to word it clearly... it came out all confusing... suffice it to say
that you were all a big help. I have worked it out.

I changed my method of handling the input. I went with the CGI Module.
Thanks.


David Gerler
Gerler Enterprises
PO Box 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Full Featured Web Hosting from $5.95 /Mo.
Full cgi-bin access, MySQL, and Unlimited email addresses.
http://www.EasySitesForLess.com/

Nationwide Internet Access $9.95 /Mo.
No Contracts, No Advertisements, No Pop-ups!
http://www.DataDaves.net/

-Original Message-
From: Dan Muey [mailto:[EMAIL PROTECTED]
Sent: Monday, March 03, 2003 12:09 PM
To: Randal L. Schwartz; [EMAIL PROTECTED]; David Gerler
Subject: RE: STDIN question

That's what I thought too, that's why I asked where STDIN was coming
from.

Always a bad idea to parse the input yourself because, as you found,
Different OS/perl versions/protocals/etc... May need different
parseing
Methods.

But CGI is modular and platform independent and quite easy to use ::

Perldoc -m CGI
Or search.cpan.org

use CGI qw/:standard/;

$monkey = param('monkey');
$joemama = param('joemama');

print header();
print Hello $monkey - Thanks for filling out my html form and by the
way : $joemama;


DMuey

  David == David Gerler
 [EMAIL PROTECTED] writes:

 David in my script I have a subroutine that begins with this
line...

 David my @stuff = split(//,STDIN);

 My crystal ball says it's a CGI protocol handler.

 To which I must reply don't use that, use CGI.pm.  Please.

 --
 Randal L. Schwartz - Stonehenge Consulting Services, Inc. -
 +1 503 777 0095 [EMAIL PROTECTED]
 URL:http://www.stonehenge.com/merlyn/
 Perl/Unix/security consulting, Technical writing, Comedy,
 etc. etc. See PerlTraining.Stonehenge.com for onsite and
 open-enrollment Perl training!

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Module to access MS Word files.

2003-02-23 Thread David Gerler
I have search cpan for modules to access MS Word files so that I can
parse data from the files. I haven't had much luck in narrowing down
the returned hits. Can anyone direct me to a module that I could use?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Titlecase

2003-01-12 Thread David Gerler
Hi,
I have a line of text that is all uppercase and I need to change it
to titlecase. i.e. THIS IS THE LINE needs to become This Is The
Line. I can make it all lower case using tr///. I have researched in
my books and found that and the \u to for making the next character
titlecase but can't seem to make it work the way I want it too.

This is what I tried:
  $title =~ tr/A-Z/a-z/;
  $title =~ s/(\W)/\u$1/;

As I said, this will make the whole statement lowercase but won't
capitalize the first letter. Any help will be appreciated.

David Gerler
Gerler Enterprises
PO Box 16357
Chesapeake VA 23328
(757) 410-0738
http://www.GerlerEnterprises.com/

Web Hosting from $5.95 per month
http://www.easysitesforless.com/

$9.95 /mo. Internet Access
http://www.DataDaves.net/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




scripts run by nobody

2002-10-14 Thread David Gerler

How do I make a script run as a specific user.

I am working on a script that uses a pipe to send information to a
program that outputs to a file. It works on win2000. I have uploaded
it and it runs and works correctly when run in the debugger from a
shell with the command perl -d. The only time it doesn't run is when
it is called as an action from a form in a browser. The only
difference that I can find is that when call from the browser it runs
as nobody. In the debugger it runs as the login user and works
correctly.
When I say that it runs as nobody, I mean that the file output from
the pipe is owned by nobody.
Can anyone shed any light on this? How can I make the file run as my
user? Alternately, how do I make it chown the file to me. This is on a
virtual host server.

David Gerler
Gerler Enterprises
PO Box 16357
Chesapeake VA 23328
(757) 410-0738
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45 /mo.
http://www.EasySitesForLess.com/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Help with pipes

2002-10-13 Thread David Gerler

I have successfully pipe a print statement to gpg. My problem is coming in
when I try to get it back out via a pipe. Can anyone tell me, is it possible
to send data to a another program and the output back with out writing it to
a file?

This is my code to pipe it to gpg:

sub scramble {
my $number = $_[0];
my $db = $_[1];
my $username = $_[2];
my $exp = $_[3];

makeScratch();
if ($OS eq windows) {
$outfile = .\\$scratchPad\\.temp1.txt;
$cmd = c:\\gnupg\\gpg -ea -r ezbid  $outfile;
} else {
$outfile = $scratchPad/.temp1.txt;
$cmd = gpg -ea -r ezbid --always-trust --no-secmem-warning  $outfile;
}

open (GPGOUT, | $cmd) || die couldn't open GPGOUT;
print GPGOUT $number;
close GPGOUT;

open (FILEOUT,  $outfile) or die Can't open it: $!;
while (FILEOUT) {
$temp .= $_;
}
close FILEOUT;

$dbh=$db-prepare(update Members set tempnum = '$temp', ccexpire = '$exp'
WHERE username='$username');
$dbh-execute();

cleanScratch;


return 1;
}


I have seen something in Programing Perl  about socketpairs and pipe(read,
write) but when I tried it I got very confused.

Thanks,

Dave




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




help with pipes

2002-10-13 Thread David Gerler

I have successfully piped a print statement to gpg. My problem is
coming in
when I try to get it back out via a pipe. Can anyone tell me, is it
possible
to send data to a another program and the output back with out writing
it to
a file?

I want to change the method of piping because of some strange
problems:
If I run it from a shell on the server using the -d switch. It
generates the key and stores it correctly. The problem comes in when I
run it from the browser. It doesn't generate the key.
I would also like to change it for security reasons.

This is my code to pipe it to gpg:

sub scramble {
my $number = $_[0];
my $db = $_[1];
my $username = $_[2];
my $exp = $_[3];

makeScratch();
if ($OS eq windows) {
$outfile = .\\$scratchPad\\.temp1.txt;
$cmd = c:\\gnupg\\gpg -ea -r ezbid  $outfile;
} else {
$outfile = $scratchPad/.temp1.txt;
$cmd = gpg -ea -r ezbid --always-trust --no-secmem-warning 
$outfile;
}

open (GPGOUT, | $cmd) || die couldn't open GPGOUT;
print GPGOUT $number;
close GPGOUT;

open (FILEOUT,  $outfile) or die Can't open it: $!;
while (FILEOUT) {
$temp .= $_;
}
close FILEOUT;

$dbh=$db-prepare(update Members set tempnum = '$temp', ccexpire =
'$exp'
WHERE username='$username');
$dbh-execute();

cleanScratch;

return 1;
}



I have seen something in Programing Perl  about socketpairs and
pipe(read,
write) but when I tried it I got very confused.

Thanks,

David Gerler
Gerler Enterprises
PO Box 16357
Chesapeake VA 23328
(757) 410-0738
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45 /mo.
http://www.EasySitesForLess.com/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Perl PGP

2002-10-07 Thread David Gerler

Can anyone direct me to documentation about using PGP with perl. Somthing in
addition to the perldocs. I need more about than that provides. If anyone
has a script that illustrates how to call it to encrypt data before sending
it with sendmail, it would be a great help.

Dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problems with perl and cron jobs

2002-09-08 Thread David Gerler


 David Gerler wrote:
  Hi all,
  I have a script that runs an SQL query and sends an email
 using sendmail.
  It works fine if called using a browser. The email is sent with
 the correct
  content in the message.
  If I run it using cron, I get the message but the content
 is not sent.
  Meaning the body of the message is empty. I also get an email
 from cron that
  contains and error message:
  ---
  DBD::mysql::db do failed: You have an error in your SQL syntax
 near '' at
  line 1 at /home/ezbid/www/cgi-bin/ua/includes/close_item.pl line 248.
  --
 
  Can anybody give me some insight as to why I get an error when cron
  executes the script, but when I do it in a browser it works fine.
 
  Any help is appreciated.
 
  David Gerler
  Gerler Enterprises
  PO BOX 16357
  Chesapeake VA 23328
  http://www.GerlerEnterprises.com/
 
  Nationwide Dial-up from $12.45
  http://www.EasySitesForLess.com/
 
 
 
 

 I ( we ) would need to see the script(s) that cron is calling to help
 out. However, I get that DBD error all the time :-) .. are you sure your
 sql statement is correct?

 Thanatos

The script runs when called from a browser so I was thinking that it had to
do with the differences in how apache and cron worked or something like
that, so I didn't include the code. I will include the code below:

This is the sql statement from line 248:
$db-do(UPDATE Members SET won=won + 1 WHERE usernum=$biddernum);

This is the job I set in cronjobs:
* * * * *   /home/ezbid/www/cgi-bin/ua/item.pl?item=958  /dev/null

I'm new to SQL also, so could the spaces around the + be the problem?

Dave


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Problems with perl and cron jobs

2002-09-08 Thread David Gerler




  Also, is $biddernum defined and does it contain a value?

 I would look really closely at this statement as I think this is probably
 the problem (based on your error message and description).  More
 than likely
 you are setting it with some user input field on the web page
 (like a cookie
 even?)  and those things don't exist when you run it from cron.

 HTH,
 Tanton



Thanks to all for the help... I think this may have hit the nail on the
head. The script is one that I purchased and I'm not completely sure what is
happening... though I have a general idea. I need to run this script through
cron so that it will clean the closed auctions from the database. I think
the best solution is going to be to write a User Agent script to browse the
page and run that with cron. That way all the ENV variables and cookies are
set. Might not be the best method, but will be the quickest for me.

Again, thanks for all the replies.

Dave


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Problems with perl and cron jobs

2002-09-07 Thread David Gerler

Hi all,
I have a script that runs an SQL query and sends an email using sendmail.
It works fine if called using a browser. The email is sent with the correct
content in the message.
If I run it using cron, I get the message but the content is not sent.
Meaning the body of the message is empty. I also get an email from cron that
contains and error message:
---
DBD::mysql::db do failed: You have an error in your SQL syntax near '' at
line 1 at /home/ezbid/www/cgi-bin/ua/includes/close_item.pl line 248.
--

Can anybody give me some insight as to why I get an error when cron
executes the script, but when I do it in a browser it works fine.

Any help is appreciated.

David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: filehandles and while loops

2002-07-27 Thread David Gerler

I thought that was the applicable part. :-) Guess I needed more After the while 
loop, I would write the output to Count according to whether it was found or not. If 
it was found it should substitute the new cont for the old. If not found, it adds it 
to the end. 


After getting your email and making some changes, it will enter the while loop now and 
everything works except the print statements.

When I watch $_, the substitution takes place. It just doesn't get printed bank to 
file. Likewise, if it is not found and it executes the if (!$found) but doesn't print 
to COUNT either.

The file does contain multiple lines.

Here's the new whole sub:

sub count { 
open (COUNT, +./count.dat) or die cannot open countfile: $!; 
flock(COUNT, 2); 
my $found = 1;
my $image = BC0012;
while (COUNT){   
print test;
if (m/$image/i){
($key, $count) = split('=',$_);
$count++;
s/$image.*\n/$image\=$count\n/;
print COUNT $_;
last;
} else {
$found = 0;
}

}
if (!$found){
print COUNT $image\=$count\n;
}

flock(COUNT, 8); 
close (COUNT) or die cannot close countfile: $!; 
return 1; 
} 

-Original Message-
From: Connie Chan [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 27, 2002 4:57 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: filehandles and while loops


  sub count {
  open (COUNT, +./count.dat) or die cannot open countfile: $!;
  flock(COUNT, 2);
  
  while (COUNT){
  if (m/BC0012/i){
  ($key, $count) = split('=',$_);
  $found = 1;
  $count++;
  } else {
  $found = 0;
  }
  }

That's quite strange is this COUNT file single line ?
or mulitiple lines ? 

If single line :
1. The while loop is useless. simplily :

$ln = COUNT ;
($key, $count) = split(/=/, $ln) if ($ln =~ /BC0012/i);
$found = 1 if ($key);
  
2. However, you didn't do anything to write to the FH and/or
printout the $count ?! How can you know this doesn't work ? =)

If muliple lines :

You will make $found = 0 at the end, if /BC0012/ not existed
at the last line. Maybe you want something like this.

my $found =0 ;

while (...) 
{ # if match, do something
$found = 1
}

print $found; # so you get the right ans.

Both single and multiple lines :
1. use strict and warnings;
2. open (FH, file) or + rather then +, that talking about 
some file mode or fix length. It's no use here. But for this 
case, I still recommand you use the simplest, .

Rgds,
Connie




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




filehandles and while loops

2002-07-26 Thread David Gerler

okay... seems tonight is the night for regex... I have been looking at the
emails that have been flying all evening.. I have tried to implement what I
see.

For some reason, mine don't work. Others say what they got in the email
works. I try it and it don't.

The plan for the code is to read a count (looks like BC0012=2) and add one
and replace it in the file. When I execute it, It never enters the while
loop.

Here's my code. This is the applicable part. I do close the file later. I
have also tried opening the file with + with any luck.

sub count {
open (COUNT, +./count.dat) or die cannot open countfile: $!;
flock(COUNT, 2);

while (COUNT){
if (m/BC0012/i){
($key, $count) = split('=',$_);
$found = 1;
$count++;
} else {
$found = 0;
}

}

Any help is appreciated!



David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Cut string between the words

2002-07-23 Thread David Gerler

Thanks Shawn, but I need to basically split the string into two strings
between the words. I need to put the second half of the string into another
string.

That may help with some future scripts though. Thanks for pointing it out.

David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/

-Original Message-
From: Shawn [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:28 PM
To: David Gerler; Beginners
Subject: Re: Cut string between the words


Check out Text::Wrap on CPAN.

http://search.cpan.org/doc/MUIR/Text-Tabs+Wrap-2001.0131/lib/Text/Wrap.pm

Shawn
- Original Message -
From: David Gerler [EMAIL PROTECTED]
To: Beginners [EMAIL PROTECTED]
Sent: Tuesday, July 23, 2002 1:16 PM
Subject: Cut string between the words


 I figure that I can use substr() to cut up a string, but how do I make it
 between words?

 How do I measure a string to see if it is greater than 85 characters?

 Basically, if the string is more than 85 characters, how do I break it at
 the last full word?


 David Gerler
 Gerler Enterprises
 PO BOX 16357
 Chesapeake VA 23328
 http://www.GerlerEnterprises.com/

 Nationwide Dial-up from $12.45
 http://www.EasySitesForLess.com/


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Cut string between the words

2002-07-23 Thread David Gerler

Thanks to all that posted... very informative.. and helpful.

David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/ 

-Original Message-
From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 23, 2002 2:53 PM
To: David Gerler
Cc: Beginners
Subject: Re: Cut string between the words


On Jul 23, Jeff 'japhy' Pinyan said:

  if (length($str)  85) {
$str =~ s/(.{0,85})(?=\S)(?!\S).*/$1/s;
  }

That can be

  $str =~ s/(.{0,84}\S)(?!\S).*/$1/s;

  use Regexp::Keep;
  $str =~ s/.{0,85}\K(?=\S)(?!\S).*//s;

And that would be

  $str =~ s/.{0,84}\S\K(?!\S).*//s;

The Regexp::Keep module doesn't present NEARLY the same speed increase as
the actual patch I've made to Perl (which is more than twice as fast as
without \K), but it lets you use the handy syntax.

-- 
Jeff japhy Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for Regular Expressions in Perl published by Manning, in 2002 **
stu what does y/// stand for?  tenderpuss why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




perl graphics editing

2002-07-18 Thread David Gerler

Hi,
I have searched cpan using ppm looking for a package to use. I would like
to write a script to edit the size of jpg's. Is there a package out there or
even a script out there that will help me with this?

I have about 2500 images that I need to resize to make them thumbs. That'll
take a long time unless I can automate it somehow.
Size attributes are not an option, because of the software I am dealing
with.

Any helpful hints in the right direction will be helpful.

David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: perl graphics editing

2002-07-18 Thread David Gerler

Thanks to all that gave the info. Seems that ImageMagik is the winner hands
down. :-)

David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/

-Original Message-
From: Matt Simonsen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 4:22 PM
To: David Gerler; Beginners
Subject: Re: perl graphics editing


This isn't a Perl solution (unless you run it from a perl script...) but
it'll work. Use mogrify, part of the imagemagic software suite one
command will do the whole trick.

Matt

On Thu, 2002-07-18 at 11:56, David Gerler wrote:
 Hi,
   I have searched cpan using ppm looking for a package to use. I would like
 to write a script to edit the size of jpg's. Is there a package out there
or
 even a script out there that will help me with this?

   I have about 2500 images that I need to resize to make them thumbs.
That'll
 take a long time unless I can automate it somehow.
   Size attributes are not an option, because of the software I am dealing
 with.

   Any helpful hints in the right direction will be helpful.

 David Gerler
 Gerler Enterprises
 PO BOX 16357
 Chesapeake VA 23328
 http://www.GerlerEnterprises.com/

 Nationwide Dial-up from $12.45
 http://www.EasySitesForLess.com/


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Help installing Mail::Audit

2002-07-12 Thread David Gerler

I am running win200 and ActiveState Perl. I am attempting to install
Mail-Audit with the PPM. I have successfully install Mail-tools and
Mime-tools.

However, when I use install Mail-Audit,

I get  Error:  no suitable installation target found for package
Mail-Audit.

Any help anyone can give is appreciated.


David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




mail filters

2002-07-11 Thread David Gerler

Hi,
I am trying to setup mail filters on my domain that is on a virtual host.
I have a copy of TPJ #18 (Summer 2000) and have read the article about mail
filtering. The problem I am having is finding out where to put the .forward
or .qmail file to direct mail to my script. I have attempted to use find on
the server without any luck.
If anybody has any input. I would appreciate it.

David Gerler
Gerler Enterprises
PO BOX 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/

Nationwide Dial-up from $12.45
http://www.EasySitesForLess.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: mail filters

2002-07-11 Thread David Gerler

The following message was sent by fliptop [EMAIL PROTECTED] on Thu, 11 Jul 
2002 11:11:01 -0400.

 David Gerler wrote:
 
  Hi,
  I am trying to setup mail filters on my domain that is on a virtual host.
  I have a copy of TPJ #18 (Summer 2000) and have read the article about mail
  filtering. The problem I am having is finding out where to put the .forward
  or .qmail file to direct mail to my script. I have attempted to use find on
  the server without any luck.
 
 
 put it in your home directory.
 
 for example, my login is fliptop, and my home directory is
 
 /home/fliptop
 
 so i'd create the file
 
 /home/fliptop/.forward
 

Thanks. It seems to find it but it kills all mail delivery. This is what I am putting 
in the text file:

|/home/gerleren/test.pl 


Where test is a test script copied from TPJ that should kill only specific email 
addresses (not the exact duplicate of TPJ chuckmail but based on it). Is that correct? 
The mail server is exim.

Dave Gerler

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




need terminology help

2002-02-25 Thread David Gerler

I can't figure out the terminology for what I want to do. I have searched my
resources for what I think it is with no luck.

Here's what I want.

I want the script to login to a web site. The website will redirect to
another site with a session id in the url. I need to parse the session id
out of the url so I can use it in future communications. I have tried
searching for parse Url and a manual search for terms that I think might
apply. Any help or leads anyone can provide will be appreciated.


David Gerler
Gerler Enterprises
PO Box 16357
Chesapeake VA 23328
http://www.GerlerEnterprises.com/


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: need terminology help

2002-02-25 Thread David Gerler

Peter,
Thanks for that implementation. That helps with that part. I am still not
clear on how to get the URL into the variable to begin with. When I login
manually, it sends me to a page that looks like this (
http://www.thissite.com/Welcome.asp?4A9BDA7AD78140 )

The part I want to pull out and reuse is after the (?) or 4A9BDA7AD78140 .
However, I don't get how to move the
http://www.thissite.com/Welcome.asp?4A9BDA7AD78140 to a variable to parse.

In case you didn't notice, I am quite new to perl. I have modified a few
scripts and created only one before this one.

once again, I appreciate your help.

Dave Gerler


-Original Message-
From: Peter Scott [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 9:15 AM
To: David Gerler; [EMAIL PROTECTED]
Subject: Re: need terminology help


At 11:18 PM 2/24/02 -0800, David Gerler wrote:
I can't figure out the terminology for what I want to do. I have searched
my
resources for what I think it is with no luck.

Here's what I want.

I want the script to login to a web site. The website will redirect to
another site with a session id in the url. I need to parse the session id
out of the url so I can use it in future communications. I have tried
searching for parse Url and a manual search for terms that I think might
apply. Any help or leads anyone can provide will be appreciated.

Well, you got the terminology right, so I'll press on to implementation.

Use the query_form method from the URI module to get the value you want:

use URI;
$u = URI-new(http://foo.com/bar.cgi?baz=blechbibble=bubble;);
%query = $u-query_form;
print $query{bibble}'

prints bubble

--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




autoresponder?

2001-10-25 Thread David Gerler

I want to write a script to handle emails sent to a specific address. I want
it to respond in specific ways. My problem is I don't know where to start.
Where can I get documentation about this? Recommended books maybe.

David Gerler
Gerler Enterprises

See our products at http://www.GerlerEnterprises.com




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]