Need vacation program in Perl! 
Author Message
 Need vacation program in Perl!

Hi,

Anyone can provide me with vacation program in Perl?

Thanks,



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Quote:

> Anyone can provide me with vacation program in Perl?

    exec 'vacation';            #  :-)

Works for me!

Seriously, why do you want one written in Perl? The available program is
pretty versatile and efficient; I don't see much reason to re-write it. Is
there something that it won't do for you?

-- Tom Phoenix        http://www.teleport.com/~rootbeer/

Randal Schwartz Case:     http://www.lightlink.com/fors/



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

: Anyone can provide me with vacation program in Perl?

if($day eq 'Saturday') { print "I'm on vacation!\n"; }

:-)

What kind of vacation program are you looking for?  Like an auto-responder
to your e-mail when you're away?  If you're using Unix, why not use the
vacation program?
--
Nathan V. Patwardhan



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

MH> Hi,
MH> Anyone can provide me with vacation program in Perl?

MH> Thanks,

Maybe if you supply a correct email address

The original message was received at Fri, 30 May 1997 10:55:31 -0500 (CDT)
from motgate.mot.com [129.188.136.100]

   ----- The following addresses have delivery notifications -----

   ----- Transcript of session follows -----

--

URL: http://www.cs.ruu.nl/~piet [PGP]



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Quote:


> MH> Hi,
> MH> Anyone can provide me with vacation program in Perl?

> MH> Thanks,

> Maybe if you supply a correct email address

> The original message was received at Fri, 30 May 1997 10:55:31 -0500
> (CDT)
> from motgate.mot.com [129.188.136.100]

>    ----- The following addresses have delivery notifications -----

>    ----- Transcript of session follows -----

> bang.cig.mot.com: host not found)

> --

> URL: http://www.cs.ruu.nl/~piet [PGP]

I provided the correct email, though.
It might be the problem on my company's gateway.

Thanks,



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Quote:


> > Anyone can provide me with vacation program in Perl?

>     exec 'vacation';            #  :-)

> Works for me!

> Seriously, why do you want one written in Perl? The available program
> is
> pretty versatile and efficient; I don't see much reason to re-write
> it. Is
> there something that it won't do for you?

> -- Tom Phoenix        http://www.teleport.com/~rootbeer/

> Randal Schwartz Case:     http://www.lightlink.com/fors/

Because my mail server is running on HP-UX box.
It doesn't have vacation program on it.
I don't know why.

Thanks,



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Quote:

> It doesn't have vacation program on it.

You can probably install the GNU vacation program, which should be found
on many Linux archive sites. Hope this helps!

-- Tom Phoenix        http://www.teleport.com/~rootbeer/

Randal Schwartz Case:     http://www.lightlink.com/fors/



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

: You can probably install the GNU vacation program, which should be found
: on many Linux archive sites. Hope this helps!

Come to think of it, mailagent, a mail filtering program written in Perl
seems to support a "vacation mode" if memory serves correctly.  Mailagent
isn't the fastest mail filter known to person, but if Randal says he likes
it, that's good enough for me.  :-)

Even if mailagent doesn't support a vacation mode, you could always write
a regexp in the rules file for all recevied messages, and send a reply to
the sender.  You probably could do the same with elm's filter or procmail.

Hope this helps!

--
Nathan V. Patwardhan



Tue, 16 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Quote:

> > > Anyone can provide me with vacation program in Perl?

See http://www.amherst.edu/~atstarr/computers/vacation.html -- it has
copies of a couple of different versions in Perl, neither of which were
written by me.

Good luck!

-Andrew

--
Andrew Starr  atstarr (punctuation) amherst (punctuation) edu
http://www.amherst.edu/~atstarr/eudora has my unoff. Eudora Site
http://www.amherst.edu/~atstarr/eudora/faq.html by Hank Zimmerman
I have no connection to Qualcomm other than being a happy customer!
If this post/email is answering a help request, please try to post
  followup questions, esp. new questions, to the newsgroup. Thanks.



Wed, 17 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

I would like to find a function that is able to check if two or more words
appear in a string an dreturn true o r False

Exemple:

sub check {bla bla...}

$string_a = 'Hi this is my pentium talking";
$true = 1;

if &chek (('Hi','pentium') = $true) {Print (" 2 Words found")}
if &chek (('Hi','pentium,talking') = $true) {Print (" 3 Words found")}

Can anyone help me....



Thu, 18 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Ccadic> sub check {bla bla...}
Ccadic> $string_a = 'Hi this is my pentium talking";
Ccadic> $true = 1;
Ccadic> if &chek (('Hi','pentium') = $true) {Print (" 2 Words found")}
Ccadic> if &chek (('Hi','pentium,talking') = $true) {Print (" 3 Words found")}
Ccadic> Can anyone help me....

Well what's wrong with reading the manual and FAQ.

But being in a generous mood, heres a simple version to get you started.

#!/usr/local/bin/perl -w
sub check
{
        my($haystack) = shift;


                return "True" unless 0 > index($needle, $haystack)
        }
        "False";

Quote:
}

print "needle in haystack ", &check("needle", "haystack"),"\n";
print "hay in haystack ", &check("hay", "haystack"),"\n";
print "stack in haystack ", &check("stack", "haystack"),"\n";

__END__

Results in:

needle in haystack False
hay in haystack True
stack in haystack True

Generalization to regular expressions (eg \b to ensure word boundary. Be
careful of what is a word boundary.) and checking for exact count of
matched words, is left as an excersize for the poster.

<chaim>
--
Chaim Frenkel                                   Nonlinear Knowledge, Inc.



Thu, 18 Nov 1999 03:00:00 GMT  
 Need vacation program in Perl!

Quote:

>I would like to find a function that is able to check if two or more words
>appear in a string an dreturn true o r False

Grab a book on perl, or the man pages and look at the index() function
or regular expressions, as well as looping constructs.

Quote:
>$true = 1;

You might want to try to avoid defining "true" and "false". Since
there are many true values, (and in perl, a few false values as well.)
you'll find yourself tripping up later when something returns a true
value other than 1.

Quote:
>if &chek (('Hi','pentium') = $true) {Print (" 2 Words found")}
>if &chek (('Hi','pentium,talking') = $true) {Print (" 3 Words found")}

sub check {
 # string to check
 my $source = shift;
 # substrings to check for

 # holds current substring
 my $findthis;
 # holds count of substrings that match
 my $count = 0;

 # for each substring

   # increment count if it exists in the source string
   $count++ if index $source,$findthis != -1;
 }
 # return the number of matches found.
 return $count;

Quote:
}

If you are going to do a large number of repeated single word matches
against the same string, you might want to split the source string up
into words, store them in a hash, and check for the existence of a
word in the hash. The time spent splitting the string and filling the
hash will be greater, but then each following lookup will be a
constant time, rather than proportional to the string size.

--
Andrew Langmead



Thu, 18 Nov 1999 03:00:00 GMT  
 
 [ 17 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Need a vacation program that is really smart about mailing lists

2. vacation program in perl?

3. Vacation program in Perl

4. vacation program in perl

5. Question on Perl program, vacation.

6. vacation program

7. A mini-vacation program (unix utility), mail manipulator

8. Vacation program

9. Need: PERL program to capture internet interactions of a given WINDOWS program

10. Vacation perl script

11. PROGRAMS FOR FWP(free webspace provider)---need programer or programs

12. Vacation script.

 

 
Powered by phpBB® Forum Software