Re: explanation of tr///cds terms?

2002-05-23 Thread John W. Krahn
Mark wrote: > > > If you have Perl installed then you should also have the documentation > > for Perl installed. The perlre.pod and perlop.pod documents explain how > > tr///, y///, s///, and m// work. > > > > perldoc perlop > > perldoc perlre > > I have ActiveState Perl on win2k and the docs a

Re: explanation of tr///cds terms?

2002-05-23 Thread mark
> If you have Perl installed then you should also have the documentation > for Perl installed. The perlre.pod and perlop.pod documents explain how > tr///, y///, s///, and m// work. > > perldoc perlop > perldoc perlre I have ActiveState Perl on win2k and the docs are provided in html format. I a

Re: explanation of tr///cds terms?

2002-05-23 Thread John W. Krahn
Mark wrote: > > Greetings, Hello, > I have been trying to understand the "tr///cds" pattern matching expression There is your first misconception. tr/// (and y///) does not deal with patterns or regular expressions. tr/// TRansliterates characters and ranges of characters. > using the Came

Re: Passing a variable.

2002-05-23 Thread John W. Krahn
Melissa Cama wrote: > > Hi, Hello, > I need to pass the value of a variable to another sub. Is this possible? sub times4 { my ($number) = @_; return $number * 4; } print times4( 5 ), "\n"; For all the details see: perldoc perlsub John -- use Perl; program fulfillment -- To

explanation of tr///cds terms?

2002-05-23 Thread mark
Greetings, I have been trying to understand the "tr///cds" pattern matching expression using the Camel in a Nutshell book and another one that assures me that I can do it in 24 hours. I am looking at an expession and bouncing about all over Perldoc.com, yet I am thwarted. I am seeing strange li

Passing a variable.

2002-05-23 Thread Melissa.Cama
Hi, I need to pass the value of a variable to another sub. Is this possible? Thanks Melissa -- This message and any attachment is confidential and may be privileged or otherwise protected from disclosure. If you have

Re: deleting lines from a text file using index from another file

2002-05-23 Thread Leila Lappin
Hi all, I guess no answer to this question means that I'm on the wrong track trying to use Perl to work out this problem. May be I'll use C or something else. thanks - Original Message - From: "Leila Lappin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 23, 2002 6:32

Re: anonymous array?

2002-05-23 Thread Eric Beaudoin
At 20:05 2002.05.23, HENRY,MARK (HP-Roseville,ex1) wrote: >All, > >On the following page: >http://perl.xotechnologies.net/tutorials/Mail/mailsender.txt > >...is the line beginning "ref ($sender ..." assignment of an anonymous array >to a reference? > > >Thx! > >Mark new Mail::Sender create an o

Re: been a while - variable variable names

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 05:39 , Michael Carmody wrote: > How do I define variable variable names ? > > I have an array that contains the header cells of some long columns, from > which i want to create new arrays which are called by the names in the > array. > > e.g. > > @header = (Name,

been a while - variable variable names

2002-05-23 Thread Michael Carmody
I haven't coded in perl for far too long... that aside.. How do I define variable variable names ? I have an array that contains the header cells of some long columns, from which i want to create new arrays which are called by the names in the array. e.g. @header = (Name, Address, Date, Expir

Re: Please help - perl system function

2002-05-23 Thread John W. Krahn
Frank Wu wrote: > > Hi guys, Hello, > I have a perl script using system function, owner is root, like, > > print "Previous $?, $!" ; > system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 > or die "Unable to create directory,$!, $?" > > system function

anonymous array?

2002-05-23 Thread HENRY,MARK (HP-Roseville,ex1)
All, On the following page: http://perl.xotechnologies.net/tutorials/Mail/mailsender.txt ...is the line beginning "ref ($sender ..." assignment of an anonymous array to a reference? Thx! Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: binmoding as Re: Perl Question

2002-05-23 Thread Michael Fowler
On Wed, May 22, 2002 at 05:58:59PM -0700, drieux wrote: > On Wednesday, May 22, 2002, at 01:35 , John W. Krahn wrote: > >perl -0777pi~ -e's^/usr/local^/tmp/local^' mybinaryfile.out > > way too freaky it works... but I am having > problems with the verification - since I just > ran this again

Re: Please help - perl system function

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 04:13 , Frank Wu wrote: > I have a perl script using system function, owner is root, like, > > print "Previous $?, $!" ; > system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 > or die "Unable to create directory,$!, $?" > > system

Please help - perl system function

2002-05-23 Thread Frank Wu
Hi guys, I have a perl script using system function, owner is root, like, print "Previous $?, $!" ; system("mkdir --parents --mode=0755 /home/myhome/disp/archive") == 0 or die "Unable to create directory,$!, $?" system function sometimes return non-zero value, $? is -1

Passing Data from and Sqlstatement to an email

2002-05-23 Thread Daniel J. Rychlik
Hello, This is probably and easy one but Im having trouble getting it figured out. I cannot figure out how to pass the output from my sqlstatement to the body of an email. Heres my code. # We need to use proper use DBI; use Net::SMTP; # This "agent" has to be setup in ODBC drivers in con

RE: chop ing not phrased correctly

2002-05-23 Thread Mat Harris
At 17:24 23/05/2002 -0500, Shah, Urmil wrote: >What he wanted was 2 decimal points and chop everything else > >Eg. 123.4567890 > > Needed = 123.45 or 46 (rounding after 2 digits) > >He replied to me with clarification and i think forgot to hit reply all >which brought all this confusion.. > >I t

deleting lines from a text file using index from another file

2002-05-23 Thread Leila Lappin
Hello all, I need to do something, but being new to Perl I'm not sure it's possible or how to do it. I need to remove lines of information from a text file based on information in another file. The first file contains information about some business transactions, each line describing one tran

RE: chop ing not phrased correctly

2002-05-23 Thread Shah, Urmil
What he wanted was 2 decimal points and chop everything else Eg. 123.4567890 Needed = 123.45 or 46 (rounding after 2 digits) He replied to me with clarification and i think forgot to hit reply all which brought all this confusion.. I think the problem is solved with sprintf Urmil -Or

Re: Perl/linux sysadmin question...

2002-05-23 Thread Elaine -HFB- Ashton
Ron Powell [[EMAIL PROTECTED]] quoth: *>I was recently reading Linux Administrators Handbook (by the same folks who *>wrote Unix System Administrators Handbook) and it mentioned that you could *>write a perl script to add users, set their passwords, etc. *> *>The question is, could someone point m

Re: chop ing

2002-05-23 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On May 23, John W. Krahn said: > > >> while ($chopped_char ne "."){ > >> chop $netout_new; > >> $chopped_char = "how do i get this???" > >> } > > > >$netout_new =~ s/(?<=\.)\d+$//; > > Check your logic -- the OP wants to remove "." as well: > >

Re: command-line commands within a Perl script

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 01:45 , Torres, Jose wrote: > what Perl function can I used to invoke something usually done at the > command line? > I want to execute: > > sum * > SNP/020405/foo.txt > > this will call checksum on everything and output to foo.txt in > /SNP/020405. > Problem is, t

Re: subsrting question

2002-05-23 Thread John W. Krahn
Lance Prais wrote: > > Well I am have finally got the code to recognized the right substring but > not the issue is my if statement. Could someone see what I am doing > wrong,please. > > For example I ran the script and got the following output: > > E:\sea621\siebsrvr\BIN\perl\bin>perl emailmg

Re: command-line commands within a Perl script

2002-05-23 Thread John W. Krahn
"John W. Krahn" wrote: > > This should give you some ideas on how to do it > > use warnings; > use strict; > use File::Find; > > my %files; > find( sub { > # put all .doc files in the hash > push @{$files{$File::Find::dir}}, $File::Find::name if /\.doc$/i > # get the directory name

Re: My name is ?

2002-05-23 Thread José Nyimi
print "My name is $0\n" doesn't meet my requirement. since if I invoke my script as >perl filename.pl just filename.pl is returned. That is not what I want. Instead, the module FindBin is perfectly what I was looking for. Thanks Peter ... José. "Jonathan E. Paton" <[EMAIL PROTECTED]> a écri

Re: subsrting question

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 02:29 , Lance Prais wrote: [..] > For example I ran the script and got the following output: > > E:\sea621\siebsrvr\BIN\perl\bin>perl emailmgr.pl > Successfully Completed Email Manager Working Sleeping for 10 [..] > else > { > print "Successfully Completed Emai

Re: My name is ?

2002-05-23 Thread José Nyimi
Nice, It works ;-) José. Peter Scott <[EMAIL PROTECTED]> a écrit : At 11:09 PM 5/23/02 +0200, José Nyimi wrote: >Hello, > >How can I tell my script to get the complete name of the file where this >script is written ? > >I can write something like: > >#!/usr/bin/perl -w > >use strict; >p

Re: chop ing

2002-05-23 Thread Jeff 'japhy' Pinyan
On May 23, John W. Krahn said: >> while ($chopped_char ne "."){ >> chop $netout_new; >> $chopped_char = "how do i get this???" >> } > >$netout_new =~ s/(?<=\.)\d+$//; Check your logic -- the OP wants to remove "." as well: s/\.\d+$//; -- Jeff "japhy" Pinyan [EMAIL PRO

Re: reading from .forward

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 02:04 , lz wrote: [..] > Here is what in my perl file. .forward is the same: > > #!/usr/bin/perl > open LOG, ">/home/lz/perl/logfile" or die "Can't > create logfile: $!"; > > print LOG "test"; > > When the mail is sent, the file is not generared... > When I execute t

Re: reading from .forward

2002-05-23 Thread David T-G
Leon -- ...and then lz said... % % Here is what in my mail.log file: doesn't seem like an % error! Hmmm... Don't bet on it. % % May 23 17:36:26 machineName sendmail[5104]: RAA05102: % forward /home/lz/.forward: World writable directory I haven't had to hack sendmail in a while, but I bet i

RE: subsrting question

2002-05-23 Thread Lance Prais
Well I am have finally got the code to recognized the right substring but not the issue is my if statement. Could someone see what I am doing wrong,please. For example I ran the script and got the following output: E:\sea621\siebsrvr\BIN\perl\bin>perl emailmgr.pl Successfully Completed Email Ma

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:00:00, mailer

Re: chop ing

2002-05-23 Thread John W. Krahn
Mat Harris wrote: > > i know that chop returns the char chopped but how do i get that into a var? > i want to be able to chop all numbers after decimal point from a numeric > string. i thought something like this would work: > > while ($chopped_char ne "."){ > chop $netout_new; >

Re: reading from .forward

2002-05-23 Thread David T-G
Leon -- ...and then lz said... % % Hey, Hi! % % 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 Heh. The most temporary of code has a way of hanging around... % executed. I

Re: My name is ?

2002-05-23 Thread Peter Scott
At 11:09 PM 5/23/02 +0200, José Nyimi wrote: >Hello, > >How can I tell my script to get the complete name of the file where this >script is written ? > >I can write something like: > >#!/usr/bin/perl -w > >use strict; >print "My name is ",__FILE__,"\n"; >__END__ > > >But the basename is missing,

Re: Telnet Program

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 01:01 , Felix Geerinckx wrote: > on Thu, 23 May 2002 19:51:07 GMT, Drieux wrote: > >> the trick of course is that to an arbitrary port you may >> really want to be at the > > You can specify a port number in Net::Telnet->new(...) oh heavens yes... but that would be

Re: My name is ?

2002-05-23 Thread Jonathan E. Paton
"Subject: My name is ?" That's easy, your name is José Nyimi ;-) > How can I tell my script to get the complete > name of the file where this script is written? > > I can write something like: > > #!/usr/bin/perl -w > > use strict; > print "My name is ",__FILE__,"\n"; > __END__ Ah, you mean:

Re: subsrting question

2002-05-23 Thread John W. Krahn
Lance Prais wrote: > > I am trying to use the substr() to search a text doc. The starting place > is 100. If you want to _search_ for a string you should be using index(), rindex() or a regular expression. > I am trying to test to see if "Sleeping for 10" is there. > > This is the code I

My name is ?

2002-05-23 Thread José Nyimi
Hello, How can I tell my script to get the complete name of the file where this script is written ? I can write something like: #!/usr/bin/perl -w use strict; print "My name is ",__FILE__,"\n"; __END__ But the basename is missing, how can I print the complete name ? Thx, José.

Re: command-line commands within a Perl script

2002-05-23 Thread John W. Krahn
Jose Torres wrote: > > Hi, Hello, > I have a directory with several subdirectories, each full of several dozen > Word files. For each subdirectory, I need to run the checksum app against > all of that directory's files and output a file into that directory with the > checksum results. How can

RE: chop ing

2002-05-23 Thread Shah, Urmil
$netout_new=~/(\d+)\.(\d+)/; $integer=$1; $decimal=$2; print" Integer=$integer and dec=$decimal\n"; See if this helps Urmil -Original Message- From: Mat Harris [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 3:53 PM To: [EMAIL PROTECTED] Subject: chop ing i know that chop re

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, ">/home/lz/

Re: SEND MAIL QUESTION ON NT

2002-05-23 Thread Eric Wang
I just did this, have fun ^^ you must install Mail-sendmail module #CODE STARTS HERE #!d:\perl\bin\perl.exe -w use strict; use Mail::Sendmail; my %mymail; # use =cut =cut for /* */ my ($To, $subject, $body); $subject = "subject goes here"; $To = "[EMAIL PROTECTED]"; $body = "Hello friend, \nThi

SOLVED: Re: SNMP

2002-05-23 Thread Mat Harris
At 11:30 23/05/2002 -0700, you wrote: >On Thursday, May 23, 2002, at 11:17 , Mat Harris wrote: > >>SNMP::Utils > > >Net::SNMP I am aware of - > cf: http://search.cpan.org/search?mode=module&query=SNMP > >so this must be the version from freshmeat > >but they do not have an easy to fin

RE: chop ing

2002-05-23 Thread Nikola Janceski
that will work. but shouldn't you be using sprintf() for this? > -Original Message- > From: Shishir K. Singh [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 23, 2002 4:55 PM > To: Mat Harris; [EMAIL PROTECTED] > Subject: RE: chop ing > > > does > > $chopped_char = chop $netout_new;

FW: Hello all this grading program is still messing up

2002-05-23 Thread FLAHERTY, JIM-CONT
I am so sorry , I get an output like question this is question 41 << miss didnt get grade results this is question 52<< works you answered a when correct answer is c it will not split the variable $questions_asked and and query the DB correctly , maybe parsing th

RE: chop ing

2002-05-23 Thread Shishir K. Singh
does $chopped_char = chop $netout_new; work ?? -Original Message- From: Mat Harris [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 4:53 PM To: [EMAIL PROTECTED] Subject: chop ing i know that chop returns the char chopped but how do i get that into a var? i want to be able t

chop ing

2002-05-23 Thread Mat Harris
i know that chop returns the char chopped but how do i get that into a var? i want to be able to chop all numbers after decimal point from a numeric string. i thought something like this would work: while ($chopped_char ne "."){ chop $netout_new; $chopped_char = "how do i get

Re: uniq

2002-05-23 Thread John W. Krahn
Craig Hammer wrote: > > I am working on a script to read in a firewall logfile, pull out the IP > addresses of denied packets, then give me a count per IP address, and > perform a whois on each address. > > This previously ran as a VERY SLOW shell script. In bourne, I used sort and > then uniq

RE: command-line commands within a Perl script

2002-05-23 Thread Torres, Jose
what Perl function can I used to invoke something usually done at the command line? I want to execute: sum * > SNP/020405/foo.txt this will call checksum on everything and output to foo.txt in /SNP/020405. Problem is, the * will sum all files in the current directory, not those in SNP/020405. So

Re: Perl script idea

2002-05-23 Thread John W. Krahn
Lonewolf wrote: > > I am wanting to write a script to handle a few things > 1. decrypt an encrypted password Passwords are normally encrypted with a one-way hash. In other words they are not designed to be decrypted. > 2. create new directory perldoc -f mkdir > 3. put .htaccess file into the

Re: Autodetect line endings in a text file...

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 08:37 , Timothy Johnson wrote: > Do you have to send the files back to their respective platforms? If not, > then I would suggest just changing all line endings to the line endings > that > your system uses. good point, and I think jonathan has also spoken well,

RE: Hello all this grading program is still messing up

2002-05-23 Thread Beau E. Cox
Jim - That's a bit much for most of use to wade through... Can you try to find the part of it not working and just post that? I'm sure you will get a lot more help that way! Aloha => Beau. -Original Message- From: FLAHERTY, JIM-CONT [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 200

Re: Hello all this grading program is still messing up

2002-05-23 Thread Jonathan E. Paton
--- "FLAHERTY, JIM-CONT" <[EMAIL PROTECTED]> wrote: > I have a test maker script, that generates random questions > from a DB. My grader script needs to grade those same > random questions Read, and then repost with a more specific question, one that does not take 2 hours or more to figure out

RE: Hello all this grading program is still messing up

2002-05-23 Thread Nikola Janceski
That code looks like some of my first few scripts that I ever wrote, and that I am currently re-writing (from scratch) to be more managable. Nikola Janceski He who asks is a fool for five minutes, but he who does not ask remains a fool forever. -- Chinese Proverb -

Hello all this grading program is still messing up

2002-05-23 Thread FLAHERTY, JIM-CONT
I have a test maker script , that generates random questions from a DB My grader script needs to grade those same random questions it has a variable that called $questions_asked its output is like this !146!612!145!385!655!34!122!583!119!109 the code #! /usr/bin/perl #user gr

Re: Telnet Program

2002-05-23 Thread Felix Geerinckx
on Thu, 23 May 2002 19:51:07 GMT, Drieux wrote: > the trick of course is that to an arbitrary port you may > really want to be at the You can specify a port number in Net::Telnet->new(...) -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTE

RE: Telnet Program

2002-05-23 Thread Beau E. Cox
Jason - You might want to grab Net::Telnet from CPAN. This snippet is from the documentation: use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/bash\$ $/'); $t->open("sparky"); $t->login($username, $passwd); @lines = $t->cmd("/usr/bin/who"); print @lines;

Re: What's with the "DELIVERY FAILED" bounces?

2002-05-23 Thread David T-G
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Drieux -- and then drieux said... % % On Thursday, May 23, 2002, at 11:50 , David T-G wrote: % >...and then TBone said... % >% % >% Die Uebermittlung der Nachricht an folgende Empfaenger wurde verboten: % >% [EMAIL PROTECTED] % % my german

Re: Telnet Program

2002-05-23 Thread Felix Geerinckx
on Thu, 23 May 2002 19:37:47 GMT, Jason Frisvold wrote: > I need to write a program that telnets to a specific port and logs all > the output to a file. Is there an easy way to do this in perl? I tried > this via the command line (telnet 1.2.3.4 23 > my.log &) but it > apparently buffers every

Re: Telnet Program

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 12:37 , Jason Frisvold wrote: > I need to write a program that telnets to a specific port and logs all > the output to a file. Is there an easy way to do this in perl? I tried > this via the command line (telnet 1.2.3.4 23 > my.log &) but it > apparently buffers

Re: What's with the "DELIVERY FAILED" bounces?

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 11:50 , David T-G wrote: > ...and then TBone said... > % > % Die Uebermittlung der Nachricht an folgende Empfaenger wurde verboten: > % [EMAIL PROTECTED] my german is way too rusty - I shall defer that to others. > % Reporting-MTA: dns; tbone > % > % Final-Reci

Re: hard references vs. variables

2002-05-23 Thread Adam Morton
- Original Message - From: "drieux" <[EMAIL PROTECTED]> > the variables on the left are 'softish references' to other things .. . . > not a reference but the thing in itself... > what I think you are calling 'hard reference'(). I believe 'soft references' in perl refers to the pra

Telnet Program

2002-05-23 Thread Jason Frisvold
I need to write a program that telnets to a specific port and logs all the output to a file. Is there an easy way to do this in perl? I tried this via the command line (telnet 1.2.3.4 23 > my.log &) but it apparently buffers everything and I'd like to be able to tail the file at times... -

Re: subsrting question

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 12:04 , Lance Prais wrote: > I am trying to use the substr() to search a text doc. The starting place > is 100. > > I am trying to test to see if "Sleeping for 10" is there. > > This is the code I am trying to use substr($line 100,16) but is only > returning "

RE: subsrting question

2002-05-23 Thread Beau E. Cox
Hi - this script works for me: use strict; use warnings; # make dummy input for test my $line = "x" x 100 . "Sleeping for 10" . "x" x 100; print substr($line, 97,21), "\n"; # print extra to test print substr($line, 100,15), "\n"; # just print it # note comma required after $line, and length i

Re: reading from .forward

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 11:51 , lz wrote: > Hi guys, > > sorry for the influx of messages. Here is what I have > in my .forward file > |/home/lz/perl/checkRelation.pl phase one good - the .forward file seems correct > Here is what in my perl file: > #!/usr/bin/perl > while() > { > ope

What's with the "DELIVERY FAILED" bounces?

2002-05-23 Thread David T-G
Hi, all -- Has anyone else seen this from tbone? ...and then TBone said... % % Die Uebermittlung der Nachricht an folgende Empfaenger wurde verboten: % [EMAIL PROTECTED] % Reporting-MTA: dns; tbone % % Final-Recipient: rfc822;[EMAIL PROTECTED] % Action: failed % Status: 5.7.1 % Diagnostic

subsrting question

2002-05-23 Thread Lance Prais
I am trying to use the substr() to search a text doc. The starting place is 100. I am trying to test to see if "Sleeping for 10" is there. This is the code I am trying to use substr($line 100,16) but is only returning "Sleeping f" What could I be doing wrong? Thank you in advance, Lanc

Re: hard references vs. variables

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 11:34 , HENRY,MARK (HP-Roseville,ex1) wrote: [..] > > If a scalar variable basically contains a hard reference to a thingy, then > aren't they one and the same for the most part? we presume you have peeked at perldoc perlref cf also perldoc -f ref

RE: Strange total from adding 2 numbers

2002-05-23 Thread Bob Showalter
> -Original Message- > From: LoBue, Mark [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 23, 2002 11:26 AM > To: [EMAIL PROTECTED] > Subject: RE: Strange total from adding 2 numbers > > > > > -Original Message- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED]] > >

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 reason, when I send email to the ac

Re: reading from .forward

2002-05-23 Thread Jonathan E. Paton
> Can someone please tell me, how can I read the input > send to perl from the .forward file? You *may not* want to do this, as a perl intepreter will be launched for EACH and EVERY email that is received. This could destroy system performance if you receive a lot of email, but I guess you don't

Re: hard references vs. variables

2002-05-23 Thread Chas Owens
On Thu, 2002-05-23 at 14:34, HENRY,MARK (HP-Roseville,ex1) wrote: > Hi All, > > Wondering if someone could briefly constrast/compare a hard reference & a > variable? > > If a scalar variable basically contains a hard reference to a thingy, then > aren't they one and the same for the most part? >

RE: Strange total from adding 2 numbers

2002-05-23 Thread Beau E. Cox
Hi - In your browser, go to . In general, you can get most perl core and module documentation at and/or . Aloha => Beau. -Original Message- From: LoBue, Mark [mailto:[EMAIL

RE: uniq

2002-05-23 Thread Jeff 'japhy' Pinyan
On May 23, Jeff 'japhy' Pinyan said: >Now you have %seen, which holds each element of @sorted and how many times >it appeared. Thus: > > @duplicates = grep $seen{$_} == 1, keys %seen; That should be != 1, not == 1. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japh

Re: reading from .forward

2002-05-23 Thread David T-G
Leon -- ...and then lz said... % % Hi David, Hi again. % % Thank you for your reply. Sure thing! % % 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? Ah.

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 drieux
On Thursday, May 23, 2002, at 11:00 , Leon Zilber wrote: > Hi guys, hi PerKin... [..] > > Can someone please tell me, how can I read the input > send to perl from the .forward file? you might start with man forward " Commands |command If the first character of the ad

hard references vs. variables

2002-05-23 Thread HENRY,MARK (HP-Roseville,ex1)
Hi All, Wondering if someone could briefly constrast/compare a hard reference & a variable? If a scalar variable basically contains a hard reference to a thingy, then aren't they one and the same for the most part? Or, when would I use one vs. the other.. Thanks, Mark -- To unsubscribe, e-m

RE: Strange total from adding 2 numbers

2002-05-23 Thread Wagner-David
Try: perldoc -q long decimal and it works as it should. Wags ;) -Original Message- From: LoBue, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 11:26 To: [EMAIL PROTECTED] Subject: RE: Strange total from adding 2 numbers > > -Original Messag

Re: SNMP

2002-05-23 Thread drieux
On Thursday, May 23, 2002, at 11:17 , Mat Harris wrote: > SNMP::Utils Net::SNMP I am aware of - cf: http://search.cpan.org/search?mode=module&query=SNMP so this must be the version from freshmeat but they do not have an easy to find 'README' file that expressly calls out the 'req

Re: reading from .forward

2002-05-23 Thread David T-G
Leon -- ...and then Leon Zilber said... % % Hi guys, Hello! % ... % perlAccount, which will have .forward file. % ..forward will redirect all requests to the perl ... % Can someone please tell me, how can I read the input % send to perl from the .forward file? Just the same as echo "hel

RE: Strange total from adding 2 numbers

2002-05-23 Thread LoBue, Mark
> > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] > > Sent: Thursday, May 23, 2002 8:48 AM > > To: [EMAIL PROTECTED] > > Subject: Strange total from adding 2 numbers > > > > > > Why is the addition of the numbers -67947269.62 and > > 68288455.49, both wi

RE: Send mail quesiton

2002-05-23 Thread Lance Prais
Todd, Thanks for your help but I tried both and received the same results. First I tried placing use lib qw(E:/perl/lib); at the beginning of my code like this: #!perl -w #/usr/bin/perl use lib qw(E:/perl/lib); $cmd = 'srvrmgr /g apollo.ts.checkpoint.com /e CHK_ENT_PRD /s CHK_SBL_PRD /u x

SNMP

2002-05-23 Thread Mat Harris
i have been trying to make a server info monitoring page using SNMP modules. i came across SNMP::Utils but I am getting the following errors after copying the tutorial pages _exactly_ Cannot find module (IP-MIB): At line 0 in (none) Cannot find module (IF-MIB): At line 0 in (none) Cannot find

reading from .forward

2002-05-23 Thread Leon Zilber
Hi guys, I am very new to Perl, and in need to write a perl program. The way code must get its input is through the email. Basically, email will be send to account, say, perlAccount, which will have .forward file. ..forward will redirect all requests to the perl script. Can someone please tel

RE: command-line commands within a Perl script

2002-05-23 Thread Shishir K. Singh
Whoa!! Perl was not meant to make you work so hard!! For changing directory...used function chdir (perldoc -f chdir) For getting teh directories...well opendir (DIR,"$myCurDir"); foreach (readir(DIR)) { if (-d $_) { Change to the directory } } Probably you an use recursion t

RE: command-line commands within a Perl script

2002-05-23 Thread Torres, Jose
Thanks everyone for your help. It is much appreciated. -Original Message- From: David vd Geer Inhuur tbv IPlib [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 23, 2002 12:39 PM To: [EMAIL PROTECTED]; Torres, Jose Subject: Re: command-line commands within a Perl script Hi, A possible

Re: How to use crypt ??

2002-05-23 Thread Michael Ragsdale
Yes, you need to use a salt and can use anything you'd like. For instance, if you're creating an encrypted password for a user's login, you might do something like this: my $username = 'foo'; my $password = 'bar'; my $crypted_password = crypt($password, $username); crypt() uses the first two

Re: Send mail quesiton

2002-05-23 Thread Todd Wade,,,Room 108
Lance Prais wrote: > All, >I am trying to "use Mail::Sendmail" to send mail. The problem is that > the sendmail is in the right folder. The only thing that comes to mind is > that I am doing this on NT > > The path for the sendmail.pm is perl/lib/mail/sendmail.pm > > I am getting the f

Send mail quesiton

2002-05-23 Thread Lance Prais
All, I am trying to "use Mail::Sendmail" to send mail. The problem is that the sendmail is in the right folder. The only thing that comes to mind is that I am doing this on NT The path for the sendmail.pm is perl/lib/mail/sendmail.pm I am getting the following error: E:\sea621\siebsrvr\

RE: uniq

2002-05-23 Thread Jeff 'japhy' Pinyan
On May 23, Elias Assmann said: >On Thu, 23 May 2002, Jeff 'japhy' Pinyan wrote: > >> On May 23, Craig Hammer said: >> >> >Very nice explanation. One thing though, I am not using uniq to remove >> >duplicates. I am using it to get a count of duplicates. In my case, I am >> >creating a threshhol

Re: uniq

2002-05-23 Thread A. Rivera
If he just wants to count dupes, couldn't he just sort then use something like foreach $value(@list) { $count{$value}++; if ($value ne $lastvalue && $count{$value}>1) {print $count{$value}."\n"} $lastvalue=$value; } Regards, Agustin Rivera Webmaster, Pollstar.com / PollstarOnline.com

RE: uniq

2002-05-23 Thread Elias Assmann
On Thu, 23 May 2002, Jeff 'japhy' Pinyan wrote: > On May 23, Craig Hammer said: > > >Very nice explanation. One thing though, I am not using uniq to remove > >duplicates. I am using it to get a count of duplicates. In my case, I am > >creating a threshhold to determine when someone (malicious)

Re: MIME::Lite trouble

2002-05-23 Thread Kevin Meltzer
When I get emails from those places, the HTML isn't an attachment.. it is the body of the message. Those emails are not multipart. The body of the message should be HTML, and the Content-Type of the email should be text/html. There should be no 'text part', or any parts... if you want to mimic

Re: MIME::Lite trouble

2002-05-23 Thread A. Rivera
Here are the two subroutines I use to send email through Mime::Lite. By looking at the variables that the first sub is retrieving, you can see that I'm simply passing it an HTML file and it's plain text equivalent (for those WITHOUT HTML capabilities or email client preview windows). These files

Re: command-line commands within a Perl script

2002-05-23 Thread David vd Geer Inhuur tbv IPlib
Hi, A possible way : #--- use File::Find; use File::stat; my $directory = "/user/IPlib/IPlib/"; find(\&search, $directory); } sub search() { my $file = $File::Find::name || shift; if ( -d $file ) { push @dirs,$file; } else { push @files,$file; } print @files; print @dir

RE: MIME::Lite trouble

2002-05-23 Thread rory oconnor
I did try that, but as far as I can tell, MIME::Lite::HTML fetches a web page over the internet, parses it and includes it in a message with the images. That's a bit overkill since the webpage is already on my server, and I don't want to include images in the email (the image paths are http). Is

Re: How to use crypt ??

2002-05-23 Thread Chris Ball
> "David" == David vd Geer Inhuur tbv IPlib <[EMAIL PROTECTED]> writes: David> Trying to use crypt() to encrypt a given password. I know David> how to compare a given password with an encrypted one, but to David> encrypt one myself and save it, doesn't work for me for some Da

  1   2   >