Re: deleting elements of an array and push into new

2003-01-03 Thread Shawn B
- Original Message - From: "Ramprasad" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 1:48 AM Subject: deleting elements of an array and push into new > Hello all, > I have to remove elements from an array if they match a particualr > string and put it i

Re: Brand new to Perl

2003-01-03 Thread Rob Dixon
"Wiggins D'Anconia" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > ActivePerl is free. > That's what I was trying to say :) /R -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

XML::Mini question

2003-01-03 Thread Matt
Hi, I'm using XML::Mini to parse and print the contents of an xml file. The xml file has one root tag "" and identcal children "" which has 2 attributes "id & name" and 6 children " , , " " Since their can be any number of "" tags in the xml document at any one time, however, at all times, the

Question re POP3 module

2003-01-03 Thread Mark Troyer
Hello All, Perhaps someone can help me understand what I am doing wrong. I am trying to write a program that will manipulate my various POP3 mail boxes on the net. I seem to be having a problem with the get method in the Net::POP3 module. I am trying to read a message into an array and then

Question re POP3 module

2003-01-03 Thread Mark Troyer
Hello All, Perhaps someone can help me understand what I am doing wrong. I am trying to write a program that will manipulate my various POP3 mail boxes on the net. I seem to be having a problem with the get method in the Net::POP3 module. I am trying to read a message into an array and then p

RE: Output PERL to E-mail

2003-01-03 Thread Danny Miller
Well, here's how I do it...using sendmail on a *nix machine. my $MAILFROM = '[EMAIL PROTECTED]'; my $MAILSUBJECT = "subject goes here"; my $MAILTO = '[EMAIL PROTECTED],[EMAIL PROTECTED]'; # or "user1\@domain.com" open(SENDMAIL, "| /usr/lib/sendmail $MAILTO") || die; print(SENDMAIL "From: $MAILFR

RE: deleting elements of an array and push into new

2003-01-03 Thread Bob Showalter
Ramprasad wrote: > Hello all, > I have to remove elements from an array if they match a particualr > string and put it into another array > > eg if element matches index or default I want it to be in a new array > > I am trying this > my @arr = qw( 01.html index.html aa.html bb.html cc.html d

RE: Question re POP3 module

2003-01-03 Thread wiggins
See inline. On Fri, 3 Jan 2003 00:23:01 +0100, "Mark Troyer" <[EMAIL PROTECTED]> wrote: > Hello All, > > Perhaps someone can help me understand what I am doing wrong. I am > trying to write a program that will manipulate my various POP3 mail >

Sent time in a Net::SMTP mail

2003-01-03 Thread Aman Thind
Hi all, Please help me sort the following two issues : 1 ) I cannot display the Sent time in MS Outlook in a mail generated using Net::SMTP. With the code I am using , the Sent field in the Outlook pane comes blank. 2 ) I cannot reply to the mail received using this code.The email address i

RE: Output PERL to E-mail

2003-01-03 Thread Jenda Krynicky
From: "David H. Lynch Jr." <[EMAIL PROTECTED]> > Below is a perlscript to do approximately what you asked. I found it > somewhere else on the web. Unfortunately I do not remember where, and > I have seen several similar. It is pretty basic anyway. > > #!/usr/bin/Perl > > use MIM

Re: Sent time in a Net::SMTP mail

2003-01-03 Thread Jenda Krynicky
From: Aman Thind <[EMAIL PROTECTED]> > Please help me sort the following two issues : See below. > 1 ) I cannot display the Sent time in MS Outlook in a mail generated > using Net::SMTP. > With the code I am using , the Sent field in the Outlook pane > comes > blank. > > 2 ) I cannot

RE: Sent time in a Net::SMTP mail

2003-01-03 Thread Aman Thind
Thanks a lot Jenda...u're a real wizard :) There are still just two minor issues which I thought I should bring to your notice... The time displayed is 30 mins more than the actual time here. The To \ From tab now reads : Aman Thind [[EMAIL PROTECTED]]. Can't I just do away with the email addres

RE: Sent time in a Net::SMTP mail

2003-01-03 Thread Jenda Krynicky
From: Aman Thind <[EMAIL PROTECTED]> > Thanks a lot Jenda...u're a real wizard :) Shame I can't even get drunk :-} > There are still just two minor issues which I thought I should bring > to your notice... > > The time displayed is 30 mins more than the actual time here. Are you sure the timez

RE: Sent time in a Net::SMTP mail

2003-01-03 Thread Aman Thind
Hi Jenda Apparently the time zones are correct on my machine. Statements : print scalar(localtime)."\n"; print scalar(gmtime)."\n"; Output : Fri Jan 3 20:35:34 2003 Fri Jan 3 15:05:34 2003 India is +5:30. However I think i caught the bug... The statement : elsif (abs($gm[1]-$local[1]-30)

Installing Crypt::IDEA

2003-01-03 Thread Steve Rinehart
Hello, I am experiencing some difficulties trying to install the module, Crypt::IDEA, which is required in order for me to use the Net::SSH module. When trying to install this module, I get the following error when attempting to do the "make": >perl Makefile.PL Checking if your kit is complete..

Re: Clear command in perl?

2003-01-03 Thread be.gomes
the system "clear" command merely echo's 2 escape sequences to screen, which are very easy to do by hand. This is idential to what clear does: print "\e[H\e[2J"; -gomes -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

How do I retrieve permissions?

2003-01-03 Thread Richard.C.1
I am writing a program that uses the CHMOD function to set permissions on a file. I'd like to then be able to "read" or "retrieve" the permission value for that file and compare it against what I wanted to set it to to know if it actually did get changed. I searched the fuctions that are built int

Re: glob subtlety question

2003-01-03 Thread David Eason
A little background on my question. Basically I want people to be able to say something like prog page*.html morebookmarks.html For Unix users, I want to be lazy and have the shell glob that for me. For Windows users, I want to be lazy and have the perl function glob that for me. Q1. Could the

RE: Use a hash or multi dimensional array?

2003-01-03 Thread Paul Kraus
yep your right. Type oh. Meant the scalar not the entire hash. :) > -Original Message- > From: Randal L. Schwartz [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 02, 2003 7:14 PM > To: [EMAIL PROTECTED] > Subject: Re: Use a hash or multi dimensional array? > > > > "Paul" == Pau

RE: How do I retrieve permissions?

2003-01-03 Thread Paul Kraus
perldoc -f stat > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 03, 2003 11:13 AM > To: [EMAIL PROTECTED] > Subject: How do I retrieve permissions? > > > > I am writing a program that uses the CHMOD function to set > permissions on

RE: How do I retrieve permissions?

2003-01-03 Thread wiggins
On Fri, 3 Jan 2003 11:12:43 -0500, <[EMAIL PROTECTED]> wrote: > > I am writing a program that uses the CHMOD function to set permissions > on a file. I'd like to then be able to "read" or "retrieve" the > permission value for that file and compare

Re: glob subtlety question

2003-01-03 Thread Jenda Krynicky
From: "David Eason" <[EMAIL PROTECTED]> > A little background on my question. > > Basically I want people to be able to say something like > prog page*.html morebookmarks.html > > For Unix users, I want to be lazy and have the shell glob that for me. > For Windows users, I want to be lazy and h

RE: Sent time in a Net::SMTP mail

2003-01-03 Thread Jenda Krynicky
From: Aman Thind <[EMAIL PROTECTED]> > Apparently the time zones are correct on my machine. > > Statements : > print scalar(localtime)."\n"; > print scalar(gmtime)."\n"; > > Output : > Fri Jan 3 20:35:34 2003 > Fri Jan 3 15:05:34 2003 > > India is +5:30. > > However I think

Re: Installing Crypt::IDEA

2003-01-03 Thread nyec
On Friday 03 January 2003 03:47 pm, Steve Rinehart wrote: > Hello, > > I am experiencing some difficulties trying to install the module, > Crypt::IDEA, which is required in order for me to use the Net::SSH > module. > > When trying to install this module, I get the following error when > > attempti

RE: How do I retrieve permissions?

2003-01-03 Thread Richard.C.1
Thank you! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 11:28 AM To: Copits Richard; [EMAIL PROTECTED] Subject: RE: How do I retrieve permissions? On Fri, 3 Jan 2003 11:12:43 -0500,

Why Perl kicks but!

2003-01-03 Thread Paul Kraus
Perl has got to be one of the best most efficient and logical languages I have ever learned. I learned it as a hobby with some free time at work (well I am learning anyways). With in the first 2 weeks I found a use for it in my work nearly every day. It has automated many tasks that used to be a p

How to add atachments in NET::SMTP

2003-01-03 Thread LRMK
How to add atachments in NET::SMTP

Extracting an Atachment From a Email

2003-01-03 Thread LRMK
Sign L Rakhitha Malinda Karunarathne Web :- rakhitha.cjb.net Email :[EMAIL PROTECTED] Rakhitha Malinda Karunarathne. I'm Using NET:POP3 to download mail from pop server which is in the same computer with my cgi 1. All the Attachments are comes as a Bulk of text How do I convert it into real bi

Re: How to add atachments in NET::SMTP

2003-01-03 Thread Jenda Krynicky
From: "LRMK" <[EMAIL PROTECTED]> > How to add atachments in NET::SMTP > You use either MIME::Lite or Mail::Sender. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. --

Re: Clear command in perl?

2003-01-03 Thread Paul Johnson
On Fri, Jan 03, 2003 at 10:52:27AM -0500, [EMAIL PROTECTED] wrote: > the system "clear" command merely echo's 2 escape sequences to screen, which > are very easy to do by hand. This is idential to what clear does: > > print "\e[H\e[2J"; Or let clear tell you what it does: perl -e 'my $clear =

Re: deleting elements of an array and push into new

2003-01-03 Thread david
Ramprasad wrote: > Hello all, > I have to remove elements from an array if they match a particualr > string and put it into another array > > eg if element matches index or default I want it to be in a new array > > I am trying this > my @arr = qw( 01.html index.html aa.html bb.html cc.html

Re: ANDing IP addresses

2003-01-03 Thread Nigel Wetters
On Tue, 2002-12-31 at 10:12, Mark Goland wrote: > I know there was already solution posted... Ditto. I'm a bit late with this, but there's plenty of example code in the IP::Country distribution of AND'ing IP addresses and looping through subnet masks. I tend to use only pack('N',... as this se

Comparing file sizes

2003-01-03 Thread Brian McGraw
Hello all. I'm trying to compare the size of two files in a script. I know I can open them, feed each into an array, and compare the number of lines, but that seems silly and inefficient. I tried using File::stat in the following manner: $file1 = stat($firstFile); $file2 = stat($secondFile); i

RE: Comparing file sizes

2003-01-03 Thread Wagner, David --- Senior Programmer Analyst --- WGO
I tried but am using AS 5.6.0 under w2k. The first time it complained because I did not have the file setup correctly and it died. After correcting that it worked. This is the code: use File::stat; my $firstFile = 'd:/Currwrka/00CommonPerl/03aaplxxx/aapl001.pl'; my $secondFile = '

Re: glob subtlety question

2003-01-03 Thread David Eason
The following has the same output as John's way: my @Bobs_way = glob "@ARGV" unless ! @ARGV; print "Bob\'s way:\n"; for $arg (@Bobs_way) {print "- $arg\n";}; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

References ch 8 programming Perl

2003-01-03 Thread Paul Kraus
Ok a couple questions on Ref from pg 251 programming Perl. push @$arrrayref,$filename); $$arrayref[0]="January"; @$arrayref[4..6]=qw/May June July/; So this is actually creating an anonymous array that it then references correct? so the assignments January ect are being made to an anonymous array

RE: References ch 8 programming Perl

2003-01-03 Thread Kipp, James
> push @$arrrayref,$filename); > $$arrayref[0]="January"; > @$arrayref[4..6]=qw/May June July/; > > So this is actually creating an anonymous array that it then > references > correct? > so the assignments January ect are being made to an anonymous array. Yes > > This is cool but maybe I am

Re: Why Perl kicks but!

2003-01-03 Thread David Eason
"Paul Kraus" <[EMAIL PROTECTED]> wrote in message 00e101c2b34e$47871010$64fea8c0@pkrausxp">news:00e101c2b34e$47871010$64fea8c0@pkrausxp... > PERL is the shit! Some among the global readership may not be familiar with this American idiom. This is high praise indeed. -- To unsubscribe, e-mail:

RE: References ch 8 programming Perl

2003-01-03 Thread Dan Muey
I use anonymouse variables all the time. Basically in dynamic database applications. It makes very complicated things a bit easier : @files = `ls /home/user`; foreach $file(@files) { open file... @$file = ; close file... } Open fileto contrain contents of all f

RE: References ch 8 programming Perl

2003-01-03 Thread Dan Muey
Another thing I use a lot is to take form input and build sql queries based on what is input for instance Say I want to search a table withh twenty columns If I have a form with all 20 columns that they can enter something to look for in each field thay will probably only use a few so I go @p

Re: Why Perl kicks but!

2003-01-03 Thread Rob Richardson
David and everybody else, To me, Perl is a tool to be used when other tools don't fit. It's great to be able to write a program that will run on just about every Windows and Unix box ever made, but it's hell trying to use structures more complicated than a hash. Give me Visual Basic first, and t

RE: References ch 8 programming Perl

2003-01-03 Thread wiggins
Surprised no one has mentioned it, but the complete foundation of Object Oriented Perl is based on the ability to bless a referent into a particular namespace. So obviously once/if you get into OOP references play a major role. Along these lines is the ability to pass multiple different types o

dealing with funky characters

2003-01-03 Thread willy
what i would like to do is the following::: open a file of undetermined format, take all non alphanumeric characters (other than spaces, tabs, \n etc) and parse the output around them... open (IN,"file.unknown"); while () { s/insert regular expression here/\n\n; pus

Re: deleting elements of an array and push into new

2003-01-03 Thread John W. Krahn
Ramprasad wrote: > > Hello all, Hello, > I have to remove elements from an array if they match a particualr > string and put it into another array > > eg if element matches index or default I want it to be in a new array > > I am trying this > my @arr = qw( 01.html index.html aa.html bb.ht

Re: Why Perl kicks but!

2003-01-03 Thread Paul Johnson
On Fri, Jan 03, 2003 at 01:42:58PM -0800, Rob Richardson wrote: > Give me Visual Basic first, and then C++. Perl is a last resort. Hmmm. That's interesting. Perl doesn't seem to fit everyone's way of thinking. I'm not sure whether that's a problem with Perl, or some people's thinking ;-) Act

Re: Sent time in a Net::SMTP mail

2003-01-03 Thread John W. Krahn
Jenda Krynicky wrote: > > #time diference to GMT - Windows will not set $ENV{'TZ'}, if you know a better way >... > my $GMTdiff; > { > my $time = time(); > my @local = (localtime($time))[2,1,3,4,5]; # hour, minute, mday, month, >year; I don't mind year is 1900 based and month 0-1

Re: References ch 8 programming Perl

2003-01-03 Thread John W. Krahn
Paul Kraus wrote: > > Ok a couple questions on Ref from pg 251 programming Perl. > > push @$arrrayref,$filename); > $$arrayref[0]="January"; > @$arrayref[4..6]=qw/May June July/; > > So this is actually creating an anonymous array that it then references > correct? > so the assignments January e

RE: Why Perl kicks but!

2003-01-03 Thread Dan Muey
To me Visual Basic is retarded , not even a last resort. At best a good tool to use to learn some basic concepts of programming to move on to a better one like C or a variant. But that's just me. If you don't like perl don't use it and go join a visual basic mailing list. As for me I don't like v

Re: dealing with funky characters

2003-01-03 Thread John W. Krahn
Willy wrote: > > what i would like to do is the following::: > > open a file of undetermined format, > take all non alphanumeric characters (other than spaces, tabs, \n etc) > and parse the output around them... What about punctuation characters? > open (IN,"file.unknown"); You should _always

RE: Why Perl kicks but!

2003-01-03 Thread david
Can I ask you a few questions: Dan Muey wrote: > To me Visual Basic is retarded , not even a last resort. How long have you been using VB and what version are you most familiar with? > As for me I don't like visual basic so I don't use it and I don't > post to mailing lists for it explaining th

Re: References ch 8 programming Perl

2003-01-03 Thread Paul Johnson
On Fri, Jan 03, 2003 at 03:33:30PM -0800, John W. Krahn wrote: > Paul Kraus wrote: > > > > Ok a couple questions on Ref from pg 251 programming Perl. > > > > push @$arrrayref,$filename); > > $$arrayref[0]="January"; > > @$arrayref[4..6]=qw/May June July/; > > > > So this is actually creating an

Re: References ch 8 programming Perl

2003-01-03 Thread John W. Krahn
Paul Johnson wrote: > > On Fri, Jan 03, 2003 at 03:33:30PM -0800, John W. Krahn wrote: > > Paul Kraus wrote: > > > > > > Ok a couple questions on Ref from pg 251 programming Perl. > > > > > > push @$arrrayref,$filename); > > > $$arrayref[0]="January"; > > > @$arrayref[4..6]=qw/May June July/; > >

Crypting

2003-01-03 Thread Mark Goland
Does anyone know a good place to start on encryption socket streams ?? Mark -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]