Re: newbie question for parsing incoming mails

2017-02-16 Thread Jim Gibson
> On Feb 15, 2017, at 9:56 PM, Eko Budiharto wrote: > > Jim, > I have one a couple more questions. > -. For the header, what if, I just need the subject, the from, and the > recipient, what is the command? I read the manual in the > https://metacpan.org/pod/Email::MIME#header, it does not tell

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
dear all, I have one a couple questions. -. For the header, what if, I just need the subject, the from, and the recipient, what is the command? I read the manual in the https://metacpan.org/pod/Email::MIME#header , it does not tell me how to extract

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
On Feb 15, 2017, at 7:10 PM, Eko Budiharto wrote: > > Jim, > if I want to extract all incoming emails from my qmail emails, how can > specify the folder location and specify the file name since the file name > always different? > > Thx. Use File::Find or opendir and readdir to find all of th

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
> On Feb 15, 2017, at 8:10 PM, Eko Budiharto wrote: > > dear Jim, > I tried to add lines to read file like this: > > use Email::MIME; > > my $file = '/var/qmail/mailnames/ name>/support/Maildir/cur/1487041394.M984019P23084V0803I00E03878.ABCD.NET,S=3987:2,'; > open my $ifh,

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
dear Jim, I tried to add lines to read file like this: use Email::MIME; my $file = '/var/qmail/mailnames//support/Maildir/cur/1487041394.M984019P23084V0803I00E03878.ABCD.NET,S=3987:2,'; open my $ifh, '<', $file or die "Cannot open '$file' for reading: $!"; local $/ = ''; my

Re: newbie question for parsing incoming mails

2017-02-15 Thread Eko Budiharto
Jim, if I want to extract all incoming emails from my qmail emails, how can specify the folder location and specify the file name since the file name always different? Thx. > On Feb 15, 2017, at 22:56, Jim Gibson wrote: > >> >> On Feb 14, 2017, at 10:38 PM, Eko Budiharto wrote: >> >> dear

Re: newbie question for parsing incoming mails

2017-02-15 Thread Andy Bach
> when I run it, I do not get anything. Hmm, how are you testing it. I put a single header and msg in /tmp/ml.txt (Subject: training.error Trouble wiwb) and: $ parse_email_simple.pl < /tmp/ml.txt training.error Trouble wiwb (8 lines) $ cat /tmp/ml.txt | parse_email_simple.pl training.error Trouble

Re: newbie question for parsing incoming mails

2017-02-15 Thread Jim Gibson
> On Feb 14, 2017, at 10:38 PM, Eko Budiharto wrote: > > dear all, > I have a question. > If I would like to parse all incoming mails from my qmail, which perl module > is easy to use? > my qmail emails incoming is /var/qmail/mailnames//support. In > this folder I already have preline in .qma

Re: newbie question : about the perl sprintf

2009-10-25 Thread Dr.Ruud
Majian wrote: I found these : perl -e'print 01.234 + 01.234', "\n"' perl -e'print 01.234 + 011.234' "\n"' perl -e'print 01.234.12 + 01.234', "\n"' And the results were : 1235234 1235234 1235.12234 For other surprises, try also: perl -wle 'print length(01.234.12)' perl -wle 'print 01.234.12'

Re: newbie question : about the perl sprintf

2009-10-25 Thread Philip Potter
2009/10/25 Majian : > I found these : > perl -e'print 01.234 + 01.234', "\n"' print (01).(234+01).234, "\n"; this evaluates to '1'.'235'.'234' > perl -e'print 01.234 + 011.234' "\n"' I didn't get 1235234, I got 1243234. print (01).(234+011).(234),"\n" evaluates to print '1'.(234+9).'234',"\n";

Re: newbie question : about the perl sprintf

2009-10-25 Thread Majian
I found these : perl -e'print 01.234 + 01.234', "\n"' perl -e'print 01.234 + 011.234' "\n"' perl -e'print 01.234.12 + 01.234', "\n"' And the results were : 1235234 1235234 1235.12234 Can someone explain it ? Thanks~~ On Sat, Oct 24, 2009 at 7:28 PM, Peter Scott wrote: > On Wed, 21 Oct 200

Re: newbie question : about the perl sprintf

2009-10-24 Thread Peter Scott
On Wed, 21 Oct 2009 20:52:05 +0800, Majian wrote: > And I modify it like this "sprintf "The number in > scientific > notation is %e", 01.255;" > The screen now output is " The number in scientific > notation > is 1.255000e+03" Ha, this is an

Re: newbie question : about the perl sprintf

2009-10-22 Thread uap12
On 21 Okt, 14:52, jian...@gmail.com (Majian) wrote: > Hi, all ; > >            I want to print  this sentence " The number in scientific > notation is 1.255000e+02". > >          So   I write a perl script like this : >                #!/usr/bin/perl >                 sprintf "The number in scienti

Re: newbie question : about the perl sprintf

2009-10-21 Thread Christian Bernini
> > sprintf "The number in scientific notation is %e", 1.255; > Sprintf doesn't print actually, it just returns a string based on the formats provided in the list you have. To actually print something you should use printf. printf "The number in scientific notation is %e",1255; And the notatio

Re: newbie question : about the perl sprintf

2009-10-21 Thread Jim Gibson
At 8:52 PM +0800 10/21/09, Majian wrote: Hi, all ; I want to print this sentence " The number in scientific notation is 1.255000e+02". So I write a perl script like this : #!/usr/bin/perl sprintf "The number in scientific notation is %e", 1.

Re: Newbie question about variables, arrays and where they all go

2009-01-19 Thread Telemachus
On Mon Jan 19 2009 @ 4:21, dolphin_sonar wrote: > Again, you answered my question. You should be teaching Perl as your > responses are very clear and that's not easy for people to do...give > clear, concise responses. Actually, I had a big goof in my response. The program and the print statement

Re: Newbie question about variables, arrays and where they all go

2009-01-19 Thread dolphin_sonar
On Jan 18, 7:54 pm, telemac...@arpinum.org (Telemachus) wrote: > On Sun Jan 18 2009 @ 10:59, dolphin_sonar wrote: > > >    1 # When calling 'running_sum(5, 6);' the variable 'state @numbers' > > receives those two > >    2 # parameters, (5 and 6), right? Then, the @numbers array also > > copies/sto

Re: Newbie question about variables, arrays and where they all go

2009-01-18 Thread Telemachus
From: Telemachus Date: Sun, 18 Jan 2009 20:17:27 -0500 To: beginners@perl.org Subject: Re: Newbie question about variables, arrays and where they all go On Sun Jan 18 2009 @ 7:54, Telemachus wrote: > The arguments to a subroutine go into the @_ array. The @numbers array is > empty unt

Re: Newbie question about variables, arrays and where they all go

2009-01-18 Thread Telemachus
On Sun Jan 18 2009 @ 10:59, dolphin_sonar wrote: >1 # When calling 'running_sum(5, 6);' the variable 'state @numbers' > receives those two >2 # parameters, (5 and 6), right? Then, the @numbers array also > copies/stores (5 and 6) >3 # into the special '( @_ )' variable as well, right? A

Re: newbie question - handling email addresses

2008-05-14 Thread Munzilla
Great, thanks. I had hoped that was the case. On May 14, 11:33 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > Munzilla wrote: > > i was told that Perl doesn't like the "@" character > > Then you were told wrong. > > What you need to take into account is that the '@' character in a double > q

Re: newbie question - handling email addresses

2008-05-14 Thread Gunnar Hjalmarsson
Munzilla wrote: i was told that Perl doesn't like the "@" character Then you were told wrong. What you need to take into account is that the '@' character in a double quoted string needs to be escaped, or else Perl tries to interpret it as the start of an array variable. As regards data fr

Re: Newbie question on substitution with Subroutines

2007-10-25 Thread Dr.Ruud
"minky arora" schreef: > my ($count,$count1,$count3,$count2); Consider: my @count; -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Newbie question on substitution with Subroutines

2007-10-25 Thread Paul Lalli
On Oct 25, 12:01 pm, [EMAIL PROTECTED] (Minky Arora) wrote: > I need to make multiple substitutions in a file.There could be a > situation where there are more than one substitution on a single > line.I want to count the total # of substituitions.I need to use > subroutines: Says who? Is this a h

RE: Newbie Question

2006-09-20 Thread M K Scott
/2006 17:07 To: Perl Beginners Subject: Re: Newbie Question M K Scott wrote: > Hi, Hello, > I have tried that to no avail. I have also tried a simple match > of !~ m/(m|f){1}/ and even put in the code you suggested to read > !~ m/^(m|f){1}$/ but this still doesn't work properly

Re: Newbie Question

2006-09-20 Thread John W. Krahn
M K Scott wrote: > Hi, Hello, > I have tried that to no avail. I have also tried a simple match > of !~ m/(m|f){1}/ and even put in the code you suggested to read > !~ m/^(m|f){1}$/ but this still doesn't work properly. Input of > "d" or "T" will work to say it is incorrect and input of "m" or

RE: Newbie Question

2006-09-20 Thread Lee Goddard
s this the best way to do this? > > Thanks again, > Mark > > > > From: John W. Krahn [mailto:[EMAIL PROTECTED] > Sent: Wed 20/09/2006 01:12 > To: Perl Beginners > Subject: Re: Newbie Question > > > > M K Scott wrote: &g

RE: Newbie Question

2006-09-20 Thread M K Scott
ay to do this? Thanks again, Mark ____ From: John W. Krahn [mailto:[EMAIL PROTECTED] Sent: Wed 20/09/2006 01:12 To: Perl Beginners Subject: Re: Newbie Question M K Scott wrote: > Hi all, Hello, > Please forgive the newbie nature of this question but i'm

Re: Newbie Question

2006-09-19 Thread John W. Krahn
M K Scott wrote: > Hi all, Hello, > Please forgive the newbie nature of this question but i'm just > starting off teaching myself perl from scratch and so need a little > clarification. > > I am trying to put together a script to do pattern matching and while > I can get the basic syntax alrigh

Re: Newbie Question

2006-09-19 Thread Igor Sutton
while ($string != m/[a-zA-Z]{1,5}/ ) { print("that is wrongtry again: "); chomp ($string = ); } Maybe: while ($string !~ m/.../) { ... } When you're matching against regular expressions, you need to use =~ or !~. Hope this helps. -- Igor Sutton Lopes t: +55 51 9627.0779 e:

Re: newbie question about regex

2004-09-03 Thread David Dorward
On Fri, Sep 03, 2004 at 04:33:43PM +0200, Maurice Lucas wrote: > $ ./count.pl /var/log/file text > this works fine but sometimes the "text" is "foo(bar)" and then my scripts > gives an error. > syntax error near unexpected token `foo(b' That's a shell issue, not a Perl issue. Escape your brackets

Re: newbie question about regex

2004-09-03 Thread Maurice Lucas
Hello, I call my script with the following line $ ./count.pl /var/log/file text this works fine but sometimes the "text" is "foo(bar)" and then my scripts gives an error. syntax error near unexpected token `foo(b' I believe the syntax error is from your shell and you can get around this by quoting

Re: newbie question about regex

2004-09-03 Thread Wiggins d Anconia
> Hello, > > I call my script with the following line > $ ./count.pl /var/log/file text > this works fine but sometimes the "text" is "foo(bar)" and then my scripts > gives an error. > syntax error near unexpected token `foo(b' > I believe the syntax error is from your shell and you can get ar

Re: Newbie question

2004-08-03 Thread Paul Kraus
Go to a command prompt.Type ppm hit enter. use this tool to install modules of windows. On Sat, Jul 31, 2004 at 11:22:37PM -0500, Drue Reeves wrote: > Sorry for the newbie question but, I'm having trouble using the Perldap > module. I downloaded the binaries and I am trying to install them into >

Re: newbie question about chomp...

2004-02-22 Thread WC -Sx- Jones
=pod ( R i c a r d o P i c h l e r ) wrote: Hi people, I can't make this work... foreach $input() { chomp $input; print "$input\n"; } =cut # hopefully it was previously opened. while() { chomp; s/^\s//; s/\s$//; print "$_"; } __END__ All this was asked and answered many times; p

Re: Newbie question

2003-12-13 Thread Randal L. Schwartz
> "Michael" == Michael Sullivan <[EMAIL PROTECTED]> writes: Michael> Can anyone recommend any free Perl tutorials? I know almost nothing Michael> about what I'm doing, only that it looks somewhat like C++... Once you have the basics down, there are 198+ articles at www.stonehenge.com/merlyn/

Re: Newbie question

2003-12-12 Thread drieux
On Dec 12, 2003, at 3:31 PM, Michael Sullivan wrote: Can anyone recommend any free Perl tutorials? I know almost nothing about what I'm doing, only that it looks somewhat like C++... a great place to start would be There is a set of FAQs - the frequently asked questio

Re: Newbie Question! Can Someone help?

2003-09-27 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Hello Fellow Members, > > I'm installing a script on my domain for tech support for my program. > > I understand all the install instructions except this? > > For sendmail users, edit your aliases file and add this line. > s

Re: Newbie question about the "int" operator

2003-06-14 Thread Rob Dixon
Mr.T Mr.X wrote: > Well, first of all, I am replying to this address, because everytime I try to send > an email to the "group" i get it returned. > Where am I supposed to send my questions? Well, in case its here, heres my Q: > > I am trying to work my way through the "Teach yourself PERL in

Re: NewBie Question! Please Help

2003-03-27 Thread Brett W. McCoy
On Thu, 27 Mar 2003, Palm Optins wrote: > I writting a script so when members join my program it writes their > Email Address into a flat file. I have it adding to the file this way. > > open (FILE, ">>$cgiroot/memdata/address/members.txt"); > flock(FILE, 2); > print FILE "$list\n"; > flock(FILE,

Re: NewBie Question! Please Help

2003-03-27 Thread Rob Dixon
Palm Optins wrote: > Hi All, > > I writting a script so when members join my program it writes their Email Address > into a > flat file. I have it adding to the file this way. It's better to do use Fcntl ':flock'; to get the names for the different lock vakues, then you can write: > open

Re: NewBie Question! Please Help

2003-03-27 Thread Rob Dixon
Palm Optins wrote: > Hi All, > > I writting a script so when members join my program it writes their Email Address > into a > flat file. > I have it adding to the file this way. > > open (FILE, ">>$cgiroot/memdata/address/members.txt"); > flock(FILE, 2); > print FILE "$list\n"; > flock(FILE, 8);

Re: Newbie question about modules

2003-02-18 Thread Todd Wade
"Rgíón «hávkú" <[EMAIL PROTECTED]> wrote in message 003001c2d474$f6f76b20$[EMAIL PROTECTED]">news:003001c2d474$f6f76b20$[EMAIL PROTECTED]... > Hello all. > > I've reading some messges relating to the use of modules. > > How can I know what modules are installed in the server??? > > I have my site

Re: Newbie question about modules

2003-02-14 Thread david
Paul wrote: >> How can I know what modules are installed in the server??? > > duh. Feeling dense. > I think there should be a way, but can't think of how to get a full > listing. Maybe the Config.pm? try: [xx@panda]$ perl -MFild::Find -e 'find(sub{print "$File::Find::name\n" if(/\.pm$/)},$_) fo

Re: Newbie question about modules

2003-02-14 Thread Paul
> How can I know what modules are installed in the server??? duh. Feeling dense. I think there should be a way, but can't think of how to get a full listing. Maybe the Config.pm? Anyway, to test for any *given* module(s), try perl -MModule::Name -e 'print "Module::Name is installed\n"' thus, t

Re: Newbie question

2003-02-12 Thread wiggins
On Wed, 12 Feb 2003 07:54:37 -0500, "Steve Lobach" <[EMAIL PROTECTED]> wrote: > Thanks for replying.. > I can put perl on the Win 2000 desktops.. So I could, I suppose, use tk.pm and >Telnet.pm (found on cpan)... So from this point I think I can

Re: Newbie question

2003-02-12 Thread Daryl Field
I wouldn't go down this route - consider this:- 1. Number of desktops x installing Perl + then the required modules = too much work 2. Your putting a user readable script onto each machine - that script may contain login details, unless evryone has their own login anyway. I would install a webs

Re: Newbie question

2003-02-12 Thread Steve Lobach
Thanks for replying.. I can put perl on the Win 2000 desktops.. So I could, I suppose, use tk.pm and Telnet.pm (found on cpan)... So from this point I think I can go forward.. >>> Lance <[EMAIL PROTECTED]> 02/12/03 03:42AM >>> My first thought is to make a little cgi script, but you don't have

Re: Newbie question

2003-02-12 Thread Lance
My first thought is to make a little cgi script, but you don't have a webserver... What O/S is on the desktops? More importantly, what scripting or programming language do they have in common? You can make a script or program in you choice of language. As long as it supports running other langu

Re: Newbie question in Perl

2002-12-30 Thread R. Joseph Newton
Hi Anand, Look at your logic: until (($test ne 'Y') && ($test ne 'N') && ($test ne 'y') && ($test ne 'n')) {...} #until BAD input This says that as long as there is good input, keep cyckling until you get bad input. You should either use while here, or change the condition to refle

Re: Newbie question in Perl

2002-12-30 Thread John W. Krahn
Anand Ramakrishna wrote: > > > Hi, Hello, > I am a beginner to perl. I have written a simple program in Perl > # This Program will copy the contents of a file named file.txt to another file > # newfile.txt. If newfile.txt is already existing, the user is given an option > # to overwrite the

Re: Newbie question in Perl

2002-12-30 Thread George P.
On Mon, 30 Dec 2002, Anand Ramakrishna wrote: > if (-e "newfile.txt") > { > print "WARNING !! FILE newfile.txt already exists\n"; > print "Do you want to destroy all the contents and overwrite the file\n"; > print "Type Y for Yes or N or NO\n"; > $test = ; >

Re: Newbie question

2002-12-11 Thread John W. Krahn
Ashutosh Jog wrote: > > Hello all, Hello, > I am a complete newbie and am trying to do a couple of things but was > not able to. Any assitance is welcome. > > If I have a dir structure G:\abc\efg\qrs.txt: > > 1) How can I list the entire structure under G:\abc along with all the dirs. > unde

Re: Newbie Question

2002-10-16 Thread Dharmender Rai
Montana , Read the ## part in ur attached mail below: --- montana <[EMAIL PROTECTED]> wrote: > So looking at the following package: > { package Horse; >@ISA = qw(Animal); >sub sound { "neigh" } >sub name { > my $self = shift; > $$se

Re: Newbie Question

2002-10-16 Thread montana
So looking at the following package: { package Horse; @ISA = qw(Animal); sub sound { "neigh" } sub name { my $self = shift; $$self; } sub named { my $class = shift; my $name = shift;

Re: Newbie Question.

2002-10-16 Thread Dharmender Rai
[1] pop takes out the elements from the right end of the array while shift does that from the left end. [2]When there is one element then the above mentioned functions will give you the same result :) [3] Yes, your notion about "my" is correct but for more information go through the man pages on w

RE: Newbie Question.

2002-10-16 Thread Duarte Cordeiro
Hi, don't know much about oo in perl, but a "regular" sub: >From man perlsub: [...] All functions aree passead as parameters one single flat list os scalars. [...] Any arguments passed in show up in the array '@_'.Therefor, if you called a function with two arguments, those would be stored in '$

RE: Newbie Question.

2002-10-16 Thread Timothy Johnson
Yes, shift operates on @_ by default, which is also the array that contains all arguments passed to the subroutine. You are probably right that "Sheep" is the only item in the list, due to the shift/pop behavior you mentioned. -Original Message- From: montana [mailto:[EMAIL PROTECTED]]

Re: Newbie Question

2002-10-10 Thread Jean Padilla
Hi, James Can you post some examples ? - what do you call the header in your files, - what string(s) are supposed to match what, - what is the data to write to output file(s) and so on... Rgds. James Parsons a écrit : > > Hi all > > Perl Is extremely new to me and I'm having a problem were to s

Re: Newbie Question.

2002-10-07 Thread Dharmender Rai
Write the output from AppleScript in a file and from that file your Perl Script can read the data. Also you can invoke your Perl Script directly from AppleScript. --- montana <[EMAIL PROTECTED]> wrote: > I am trying to combine the powers of applescript and > perl to better search data on some

RE: Newbie Question.

2002-10-07 Thread david
Nkuipers wrote: >>My question then, is how do you pass variables to perl script from the >>Unix command line and how are those variables processed within the script? >>More than likely, the variables will need to be passed to either an array >>or hash. > > Well, there are two main ways I know of

RE: Newbie Question.

2002-10-07 Thread nkuipers
>My question then, is how do you pass variables to perl script from the Unix >command line and how are those variables processed within the script? More >than likely, the variables will need to be passed to either an array or hash. Well, there are two main ways I know of to pass vars to Perl from

Re: Newbie Question

2002-09-18 Thread John W. Krahn
James Parsons wrote: > > Ok since I'm new to Perl I've written this fairly simple script to add > number from a text file, I have about 20-30 of these file with different > names and I would like to know how to add this to my script, I know how to > do it korn shell but in a perl script I'm rea

Re: Newbie Question

2002-09-18 Thread Sudarshan Raghavan
On Wed, 18 Sep 2002, James Parsons wrote: > Ok since I'm new to Perl I've written this fairly simple script to add > number from a text file, I have about 20-30 of these file with different > names and I would like to know how to add this to my script, I know how to > do it korn shell but in a

RE: Newbie question - Can smtp send attachments?

2002-09-05 Thread Yuen, Alex
CTED] > Subject: Re: Newbie question - Can smtp send attachments? > > Hey Alex, > > My MUA believes you used Internet Mail Service (5.5.2653.19) > to write the following on Wednesday, September 4, 2002 at 2:39:07 PM. > > YA> Hi, > > YA> Having prob

Re: Newbie question - Can smtp send attachments?

2002-09-04 Thread Tim Musson
Hey Alex, My MUA believes you used Internet Mail Service (5.5.2653.19) to write the following on Wednesday, September 4, 2002 at 2:39:07 PM. YA> Hi, YA> Having problems with just a simple test of MIME::Lite. Here is the output: YA> *

Re: Newbie question - Can smtp send attachments?

2002-09-04 Thread James Edward Gray II
It means that you need a "my" before your $msg variables' first use. You predeclared "use strict" promising Perl you would declare your variables before using them. "my $msg" would declare a local variable so you can use it. James On Wednesday, September 4, 2002, at 01:39 PM, Yuen, Alex wr

RE: Newbie question - Can smtp send attachments?

2002-09-04 Thread david
Alex Yuen wrote: > #!/usr/local/bin/perl -w > > use MIME::Lite; > use strict; > > $msg = MIME::Lite->new( > From =>'[EMAIL PROTECTED]', > To=>'[EMAIL PROTECTED]', > Subject =>'Testing MIME::Lite Module.', > Data =>"Successfully sent message." > ); >

RE: Newbie question - Can smtp send attachments?

2002-09-04 Thread Yuen, Alex
** So, what does the output message mean? Thanks. Alex > -- > From: Bob Showalter[SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, September 04, 2002 11:33 AM > To: '[EMAIL PROTECTED]' > Subject: RE: Newbie question - Can

Re: Newbie question - Can smtp send attachments?

2002-09-04 Thread Frank Wiles
.--[ Yuen, Alex wrote (2002/09/04 at 11:16:30) ]-- | | Is it possible to send attachments using NET::SMTP? | | Will I need to use a seperate module in my script? If so, which one and how? | `- It's not really possible to d

RE: Newbie question - Can smtp send attachments?

2002-09-04 Thread Bob Showalter
> -Original Message- > From: Yuen, Alex [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, September 04, 2002 11:17 AM > To: 'Perl Beginners' > Subject: Newbie question - Can smtp send attachments? > > > Hi, > > Is it possible to send attachments using NET::SMTP? Well, yes. But SMTP doesn'

RE: Newbie question on smtp...

2002-09-04 Thread Yuen, Alex
Never mind...figured it out. Stupid error with the # sign. Thanks though. Alex > -- > From: Yuen, Alex > Sent: Wednesday, September 04, 2002 10:11 AM > To: 'Perl Beginners' > Subject: Newbie question on smtp... > > I am having problems with smtp. I am trying to

RE: Newbie Question - Monitoring NT Server(s) andNotification...

2002-08-28 Thread Kipp, James
have you looked at the modules: Win32::Perflib Win32::Lanman Win32::AdminMisc Those 3 should give you most of what you need. Read the docs for them and google for examples. the examples in the docs are pretty good. also see the following links for help and examples: http://patriot.net/~carvdawg/p

Re: Newbie Question.

2002-08-27 Thread Omanakuttan
open (FH, $filename) or die $! ; my @arr = ; HTH. Om. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Newbie Question.

2002-08-27 Thread John W. Krahn
From: Ashutosh Jog [mailto:[EMAIL PROTECTED]] > > Hi, Hello, > Another question: > > If I have a hash with entries like these: > > my %hash = ($animals [0]=> [$mammals[0]], $animals[1] => [$mammals[1]]); > > But if the list has like 50 entries in both the $animals & $mammals the can > I do >

RE: Newbie Question.

2002-08-27 Thread Timothy Johnson
I think you can simplify this with a loop: for($i = 0;$i < @animals;$i++){ $hash{$animals[$i]} = $mammals[$i]; } -Original Message- From: Ashutosh Jog [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 27, 2002 2:33 PM To: Timothy Johnson Subject: Re: Newbie Question.

Re: Newbie Question.

2002-08-27 Thread John W. Krahn
Ashutosh Jog wrote: > > Hello, Hello, > This might be a very simple question, but being a newbie I have to ask. > :) > > How can I copy the line by line contents of a file to a array? > > For eg: @animals should look like > @animals = ('tiger','lion','elephant'); > > And the text file would

Re: Newbie Question.

2002-08-27 Thread Steve Grazzini
Ashutosh Jog <[EMAIL PROTECTED]> wrote: > > This might be a very simple question, but being a newbie I > have to ask. :) > > How can I copy the line by line contents of a file to a array? > > For eg: @animals should look like > @animals = ('tiger','lion','elephant'); > > And the text file wo

RE: Newbie Question.

2002-08-27 Thread Timothy Johnson
That's easy enough. Try something like this: open(INFILE,"zoo.txt"); @animals = ; Perl will automatically dump the entire contents of the file into the array, with each line as an element. But beware! If you try to do this with extremely large files, you can really bog down your program.

RE: newbie question

2002-08-20 Thread Dharmendra Rai
hi , that's correct . $| can have only 2 values. either 1 or 0. its undocumented but the behaviour is same everywhere. - Get a bigger mailbox -- choose a size that fits your needs. http://uk.docs.yahoo.com/mail_storage.html

Re: newbie question

2002-08-20 Thread Steve Grazzini
David <[EMAIL PROTECTED]> wrote: > i agree. the part that make people confuse is that most people > think $| is a variable holding a number. that's not necessary > the case. Perl could have(easily) implmented $| to be a bit > (save memory and faster access and manipulation etc) position > of a

Re: newbie question

2002-08-20 Thread Steve Grazzini
John W. Krahn <[EMAIL PROTECTED]> wrote: > Kevin Meltzer wrote: [ back and forth ] >> >>> > This is actually a bug. It just seems that nobody seems to >> >>> > care :) It would break too many JAPHs which use this. >> >>> > >> >>> > So, don't depend on it, in case it is ever fixed. >> >>> >> >>>

Re: newbie question

2002-08-20 Thread Kevin Meltzer
quot;Don't do crap with it, unless it's for it's special purpose." > > > > -Original Message- > > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, August 20, 2002 5:22 PM > > To: [EMAIL PROTECTED] > > Subject: Re: newb

RE: newbie question

2002-08-20 Thread david
e." > > >> -Original Message- >> From: John W. Krahn [mailto:[EMAIL PROTECTED]] >> Sent: Tuesday, August 20, 2002 5:22 PM >> To: [EMAIL PROTECTED] >> Subject: Re: newbie question >> >> >> Kevin Meltzer wrote: >> > >>

RE: newbie question

2002-08-20 Thread Nikola Janceski
t; Translation: "Don't do crap with it, unless it's for it's special purpose." > -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 20, 2002 5:22 PM > To: [EMAIL PROTECTED] > Subject: Re: newbie question &g

Re: newbie question

2002-08-20 Thread Kevin Meltzer
On Mon, Aug 19, 2002 at 05:17:05PM -0700, John W. Krahn ([EMAIL PROTECTED]) said something similar to: > Kevin Meltzer wrote: > > > > On Mon, Aug 19, 2002 at 04:35:53PM -0700, John W. Krahn ([EMAIL PROTECTED]) said >something similar to: > > > Kevin Meltzer wrote: > > > > > > > > This is actual

Re: newbie question

2002-08-19 Thread John W. Krahn
Kevin Meltzer wrote: > > On Mon, Aug 19, 2002 at 04:35:53PM -0700, John W. Krahn ([EMAIL PROTECTED]) said >something similar to: > > Kevin Meltzer wrote: > > > > > > This is actually a bug. It just seems that nobody seems to care :) It > > > would break too many JAPHs which use this. > > > > > >

Re: newbie question

2002-08-19 Thread Kevin Meltzer
Does that behavior not seem like a bug to you? My reference is discussions on #perl about it. I'll dig up the logs if you wish (when I can get to that). Cheers, Kevin On Mon, Aug 19, 2002 at 04:35:53PM -0700, John W. Krahn ([EMAIL PROTECTED]) said something similar to: > Kevin Meltzer wrote: >

Re: newbie question

2002-08-19 Thread John W. Krahn
Kevin Meltzer wrote: > > This is actually a bug. It just seems that nobody seems to care :) It > would break too many JAPHs which use this. > > So, don't depend on it, in case it is ever fixed. Can you cite a reference to this behavior described as a bug? John -- use Perl; program fulfillmen

Re: newbie question

2002-08-19 Thread Kevin Meltzer
This is actually a bug. It just seems that nobody seems to care :) It would break too many JAPHs which use this. So, don't depend on it, in case it is ever fixed. On Mon, Aug 19, 2002 at 01:17:15PM -0700, John W. Krahn ([EMAIL PROTECTED]) said something similar to: > Bob Showalter wrote: > Als

RE: newbie question

2002-08-19 Thread Bob Showalter
> -Original Message- > From: John W. Krahn [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 19, 2002 4:17 PM > To: [EMAIL PROTECTED] > Subject: Re: newbie question > > > Bob Showalter wrote: > > > > ...consider

Re: newbie question

2002-08-19 Thread John W. Krahn
Bob Showalter wrote: > > > From: Chad Kellerman [mailto:[EMAIL PROTECTED]] > > > >I have only been writing perl for a few months, so forgive > > me if this > > sounds stupid. > > No, it's an excellent question. > > > what is the difference between: > > > > $| = 1; > > and > > $|++; > > The

RE: newbie question

2002-08-19 Thread Bob Showalter
> -Original Message- > From: Chad Kellerman [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 19, 2002 11:18 AM > To: [EMAIL PROTECTED] > Subject: newbie question > > > Hello, > >I have only been writing perl for a few months, so forgive > me if this > sounds stupid. No, it's an

Re: newbie question about Sys::Hostname and modules in general

2002-08-02 Thread drieux
On Friday, August 2, 2002, at 08:09 , Chad Kellerman wrote: [..] > ** I always have issues with scope Can I use Sys::Hostname just in > the subroutine, or any perl module for that matter? Or do I have to use > it globally? > > $host=hostname; finds that daggone hostname and I have hostname

Re: newbie question

2002-05-18 Thread drieux
On Saturday, May 18, 2002, at 05:09 , Beau E. Cox wrote: > use strict; > > my $data = "Received 921MB 16764 3955 375 2.2% 1296 7.7%"; > @_ = $data =~ /\b(\d+)\b/g; > print "$_\n" for (@_);# prints 16764 3955 375 2 2 1296 7 7 > print "$_[2]\n"; # prints your guy: 375 > >

RE: newbie question

2002-05-18 Thread Beau E. Cox
Hi - use strict; my $data = "Received 921MB 16764 3955 375 2.2% 1296 7.7%"; @_ = $data =~ /\b(\d+)\b/g; print "$_\n" for (@_); # prints 16764 3955 375 2 2 1296 7 7 print "$_[2]\n";# prints your guy: 375 Throw the "global" (g) on the RegEx and get the results into an array..

RE: newbie question

2002-03-25 Thread Timothy Johnson
checkout perlre or do a search on regular expressions -Original Message- From: wahlstros [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 1:04 PM To: John W. Krahn Cc: [EMAIL PROTECTED] Subject: Re: newbie question where can i find a decent man page for understanding string

Re: newbie question

2002-03-25 Thread wahlstros
where can i find a decent man page for understanding string pattern matching >>push @phone, /\s(\d+\s\d+\s\d+):/; - Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 25, 2002 2:53 PM Subject: Re

Re: newbie question

2002-03-25 Thread John W. Krahn
Anidil Rajendran-Raj wrote: > > Firstname Lastname 650 156 7190:somfield:somefield:somefield > Firstname Lastname 408 256 7290:somfield:somefield:somefield > Firstname Lastname 510 3456 7390:somfield:somefield:somefield > > I have the above lines in a file and I am trying to create an array of =

RE: newbie question

2002-03-25 Thread Wagner-David
Here is a slightly modified version: #!perl -w use strict; my @array = ; # use DATA so don't have to play with file my @phone; my $MyErrors = 0; # let me know if errors foreach (@array) { chomp; # remove linefeed next if ( /^\s*$/ ); # if blank line b

RE: Newbie Question

2002-03-11 Thread Hanson, Robert
Some versions of PPM had some problems, and your config file might have been messed up. I haven't seen this problem lately, but I have had it happen to myself a while ago. There should be a file called ppm.xml in your Perl library. You will need to check it out, and see if it is still a well-fo

  1   2   >