Re: reading from .forward

2002-05-23 Thread lz
Hi David, Thank you for your reply. I am still a little confused: The message that will be forwarded will contain a value I am looking for, e.g. EMAIL_ADDRESS. How can I specify, to look for the email address? Thanks again! leon --- David T-G <[EMAIL PROTECTED]> wrote: > Leon -- > > ...and th

Re: reading from .forward

2002-05-23 Thread lz
Hi guys, sorry for the influx of messages. Here is what I have in my .forward file |/home/lz/perl/checkRelation.pl Here is what in my perl file: #!/usr/bin/perl while() { open LOG ">/home/lz/perl/logfile" or die "Can't create logfile: $!"; } For some reas

Re: reading from .forward

2002-05-23 Thread lz
Hey, thanks for the help. Right now, I don't really care about performace/DOS, I just want to make sure, if the mail is sent to that account, my perl script will be executed. It still doesn't seem to work: Here is what in my perl file. .forward is the same: #!/usr/bin/perl open LOG,

Re: reading from .forward

2002-05-23 Thread lz
Here is what in my mail.log file: doesn't seem like an error! May 23 17:36:26 machineName sendmail[5104]: RAA05102: forward /home/lz/.forward: World writable directory May 23 17:36:26 fpk-app5 sendmail[5104]: RAA05102: [EMAIL PROTECTED], ctladdr=root (0/3), delay=00:00:00, xdelay=00:

reading and parsing from STDIN

2002-05-24 Thread lz
Hi guys, I am reading an email coming to my perl script. I need to parse incoming document and select a specific field I need. WHILE() { // how do I search for a field, called e.g. // email [EMAIL PROTECTED] // and assign email to a variable? } Thanks a lot! ___

checking for an empty string

2002-05-28 Thread lz
Hi guys, while($line = ) { if ($line =~ /^email address/) { } } How can I check if $line contains a value or is empty? Thanks a lot! __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com --

sending mail from Perl redirecting from a file

2002-05-28 Thread lz
Hi guys, open TMP, ">/home/dev/perl/mail_queue/$filename" or die "Can't create file: $!"; I read an incoming file, modify it and save it in the file, as seen above. Later on, I'd like to send the above generated file: I try the following, but it doesn't work. open MSG, "|mailx -s \"test\" $mai

checking return code

2002-06-05 Thread lz
Hi guys, I have the following line: system("cat $FILENAME | mailx -s \"test\" $mailAddress "); How can I check whether mailx operation above was successful or not? Thank you! __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup htt

Re: checking return code

2002-06-05 Thread lz
David, Thank you for useful info! But as I can see this approach won't catch the problem if the incorrect email was specified ? Thank you! --- David T-G <[EMAIL PROTECTED]> wrote: > Leon -- > > ...and then lz said... > % > % Hi guys, > > Hello! > &g

help with pattern matching/parsing

2002-06-06 Thread lz
Hi guys, I will have the file that will start with the following line: Dear Name (ID12345) Do you know how can I parse the above file, so I can retrieve the ID12345? idNumber = ID12345? Thanks a lot! __ Do You Yahoo!? Yahoo!

Re: help with pattern matching/parsing

2002-06-06 Thread lz
rote: > On Jun 6, lz said: > > >I will have the file that will start with the > >following line: > > > >Dear Name (ID12345) > > > > > > > > > > >Do you know how can I parse the above file, so I > can > >retr

Re: help with pattern matching/parsing

2002-06-06 Thread lz
Hi David, I do set the line, and thats why I am not sure, why it doesn't work: while ( $line = ) { $idNumber = $line =~ /\((ID\d+)\)/; } print $idNumber; // empty Thanks again! --- David T-G <[EMAIL PROTECTED]> wrote: > Leon -- > > ...and then lz said... > % &

Re: help with pattern matching/parsing

2002-06-06 Thread lz
it out from the loop and it seemed to work fine! Thanks again! --- David T-G <[EMAIL PROTECTED]> wrote: > Leon -- > > ...and then lz said... > % > % Hi David, > > Hello! > > > % > % I do set the line, and thats why I am not sure, > why it > %

calling shell script from perl

2002-06-27 Thread lz
Hi guys, I need to call shell executable from a perl command, and here is what I do: open CRONJOB, "/home/queue/test.sh|" or die "Unable to open test.sh command: $!"; Unfortunately, neither tesh.sh executed nor I get "Unable to open test.sh" error message. Does anyone know whats the problem is

script wouldn't execute from .forward

2002-07-10 Thread lz
Hi guys, I need to execute perl script from .forward file. Basically, whenever emails comes in, a script is executed. here is an example of my setup: username: test -rwxr-xr-x 1 test test 32 Jun 6 13:53 .forward here is what I have inside of my forward: |/home/test/test.pl permissions on

parsing

2002-07-15 Thread lz
Hi guys, In some cases I will have to read the file and I will encounter a line similar to the below. "Test,Test (test,ex1)" <[EMAIL PROTECTED]> I will need to determine whether the line contains ..test.com. What is the best way to determine it? Thanks!

time comparison

2002-07-25 Thread lz
Hi guys, I am extracting the following expiration time from a certificate, and I get expiration time from the certificate in the following format. notAfter=Nov 16 23:59:59 2002 GMT I need to compare system date with the date from a certificate to find out whether certificate has already been

strange GMT Time

2002-07-26 Thread lz
Hi guys, I use Perl gmttime() to obtain UTC Time (formerly known as GMT Time) and unfortunately, value returned does not match official UTC time format: Official UTC Time Format = YYMMDDHHMMZ and here is what I get from gmtime() API= 7321826610252060 Any ideas why? Thanks a lot! __

dividing the string

2002-07-26 Thread lz
Hi guys, After all this debate, I decided to create UTC time myself from GTM time I get by calling gmtime() ;-) Thanks for the help! One question - I have year of the form (e.g. 2002) for UTC time, I need only two last digits, e.g. 02 If I have this string: $currYear = 2002; How can I re

inserting in the middle of the file

2002-07-29 Thread lz
Hi guys, I recieve an email in the following format: Dear Name, yara yara yars I need to insert a paragraph, right after word Dear Name, e.g. Dear Name, NEW_PARAGRAPH yara yara I am trying to use seek, but it doesn't work for some reason: open(ORIG_FILE, ">>$origFile") or die "cannot append"; s